mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:53:52 +00:00
fixed some more settings bugs
This commit is contained in:
parent
3ebc6fd590
commit
02a52c0ff1
2 changed files with 15 additions and 4 deletions
|
@ -238,6 +238,12 @@ namespace MWGui
|
|||
mReflectTerrainButton->setEnabled(false);
|
||||
}
|
||||
|
||||
if (shaders == "off")
|
||||
{
|
||||
mUnderwaterButton->setEnabled (false);
|
||||
mShadowsEnabledButton->setEnabled(false);
|
||||
}
|
||||
|
||||
mFullscreenButton->setCaptionWithReplacing(Settings::Manager::getBool("fullscreen", "Video") ? "#{sOn}" : "#{sOff}");
|
||||
mVSyncButton->setCaptionWithReplacing(Settings::Manager::getBool("vsync", "Video") ? "#{sOn}": "#{sOff}");
|
||||
mFPSButton->setCaptionWithReplacing(fpsLevelToStr(Settings::Manager::getInt("fps", "HUD")));
|
||||
|
@ -409,7 +415,9 @@ namespace MWGui
|
|||
mReflectObjectsButton->setEnabled(false);
|
||||
mReflectActorsButton->setEnabled(false);
|
||||
mReflectTerrainButton->setEnabled(false);
|
||||
mUnderwaterButton->setEnabled(false);
|
||||
Settings::Manager::setBool("shader", "Water", false);
|
||||
Settings::Manager::setBool("underwater effect", "Water", false);
|
||||
|
||||
// shadows not supported
|
||||
mShadowsEnabledButton->setEnabled(false);
|
||||
|
@ -418,6 +426,9 @@ namespace MWGui
|
|||
}
|
||||
else
|
||||
{
|
||||
Settings::Manager::setBool("shaders", "Objects", true);
|
||||
Settings::Manager::setString("shader mode", "General", val);
|
||||
/
|
||||
// re-enable
|
||||
if (MWRender::RenderingManager::waterShaderSupported())
|
||||
{
|
||||
|
@ -425,11 +436,9 @@ namespace MWGui
|
|||
mReflectObjectsButton->setEnabled(true);
|
||||
mReflectActorsButton->setEnabled(true);
|
||||
mReflectTerrainButton->setEnabled(true);
|
||||
mShadowsEnabledButton->setEnabled(true);
|
||||
}
|
||||
|
||||
Settings::Manager::setBool("shaders", "Objects", true);
|
||||
Settings::Manager::setString("shader mode", "General", val);
|
||||
mUnderwaterButton->setEnabled(true);
|
||||
mShadowsEnabledButton->setEnabled(true);
|
||||
}
|
||||
|
||||
apply();
|
||||
|
|
|
@ -104,6 +104,8 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
|
|||
if (!Settings::Manager::getBool("shaders", "Objects"))
|
||||
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 ("fog", "true");
|
||||
sh::Factory::getInstance ().setGlobalSetting ("lighting", "true");
|
||||
|
|
Loading…
Reference in a new issue