mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-03 01:20:11 +00:00
fixed some more settings bugs
This commit is contained in:
parent
3ebc6fd590
commit
02a52c0ff1
@ -238,6 +238,12 @@ namespace MWGui
|
|||||||
mReflectTerrainButton->setEnabled(false);
|
mReflectTerrainButton->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (shaders == "off")
|
||||||
|
{
|
||||||
|
mUnderwaterButton->setEnabled (false);
|
||||||
|
mShadowsEnabledButton->setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
mFullscreenButton->setCaptionWithReplacing(Settings::Manager::getBool("fullscreen", "Video") ? "#{sOn}" : "#{sOff}");
|
mFullscreenButton->setCaptionWithReplacing(Settings::Manager::getBool("fullscreen", "Video") ? "#{sOn}" : "#{sOff}");
|
||||||
mVSyncButton->setCaptionWithReplacing(Settings::Manager::getBool("vsync", "Video") ? "#{sOn}": "#{sOff}");
|
mVSyncButton->setCaptionWithReplacing(Settings::Manager::getBool("vsync", "Video") ? "#{sOn}": "#{sOff}");
|
||||||
mFPSButton->setCaptionWithReplacing(fpsLevelToStr(Settings::Manager::getInt("fps", "HUD")));
|
mFPSButton->setCaptionWithReplacing(fpsLevelToStr(Settings::Manager::getInt("fps", "HUD")));
|
||||||
@ -409,7 +415,9 @@ namespace MWGui
|
|||||||
mReflectObjectsButton->setEnabled(false);
|
mReflectObjectsButton->setEnabled(false);
|
||||||
mReflectActorsButton->setEnabled(false);
|
mReflectActorsButton->setEnabled(false);
|
||||||
mReflectTerrainButton->setEnabled(false);
|
mReflectTerrainButton->setEnabled(false);
|
||||||
|
mUnderwaterButton->setEnabled(false);
|
||||||
Settings::Manager::setBool("shader", "Water", false);
|
Settings::Manager::setBool("shader", "Water", false);
|
||||||
|
Settings::Manager::setBool("underwater effect", "Water", false);
|
||||||
|
|
||||||
// shadows not supported
|
// shadows not supported
|
||||||
mShadowsEnabledButton->setEnabled(false);
|
mShadowsEnabledButton->setEnabled(false);
|
||||||
@ -418,6 +426,9 @@ namespace MWGui
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Settings::Manager::setBool("shaders", "Objects", true);
|
||||||
|
Settings::Manager::setString("shader mode", "General", val);
|
||||||
|
/
|
||||||
// re-enable
|
// re-enable
|
||||||
if (MWRender::RenderingManager::waterShaderSupported())
|
if (MWRender::RenderingManager::waterShaderSupported())
|
||||||
{
|
{
|
||||||
@ -425,11 +436,9 @@ namespace MWGui
|
|||||||
mReflectObjectsButton->setEnabled(true);
|
mReflectObjectsButton->setEnabled(true);
|
||||||
mReflectActorsButton->setEnabled(true);
|
mReflectActorsButton->setEnabled(true);
|
||||||
mReflectTerrainButton->setEnabled(true);
|
mReflectTerrainButton->setEnabled(true);
|
||||||
mShadowsEnabledButton->setEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
mUnderwaterButton->setEnabled(true);
|
||||||
Settings::Manager::setBool("shaders", "Objects", true);
|
mShadowsEnabledButton->setEnabled(true);
|
||||||
Settings::Manager::setString("shader mode", "General", val);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply();
|
apply();
|
||||||
|
@ -104,6 +104,8 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
|
|||||||
if (!Settings::Manager::getBool("shaders", "Objects"))
|
if (!Settings::Manager::getBool("shaders", "Objects"))
|
||||||
Settings::Manager::setBool("enabled", "Shadows", false);
|
Settings::Manager::setBool("enabled", "Shadows", false);
|
||||||
|
|
||||||
|
sh::Factory::getInstance ().setShadersEnabled (Settings::Manager::getBool("shaders", "Objects"));
|
||||||
|
|
||||||
sh::Factory::getInstance ().setGlobalSetting ("mrt_output", useMRT() ? "true" : "false");
|
sh::Factory::getInstance ().setGlobalSetting ("mrt_output", useMRT() ? "true" : "false");
|
||||||
sh::Factory::getInstance ().setGlobalSetting ("fog", "true");
|
sh::Factory::getInstance ().setGlobalSetting ("fog", "true");
|
||||||
sh::Factory::getInstance ().setGlobalSetting ("lighting", "true");
|
sh::Factory::getInstance ().setGlobalSetting ("lighting", "true");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user