summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterpreferencesgraphicsadvanced.cpp')
-rw-r--r--indra/newview/llfloaterpreferencesgraphicsadvanced.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
index 6741dbb7e4..25ee834109 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
@@ -390,7 +390,7 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
// Bump & Shiny
LLCheckBoxCtrl* bumpshiny_ctrl = getChild<LLCheckBoxCtrl>("BumpShiny");
bool bumpshiny = LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
- bumpshiny_ctrl->setEnabled(bumpshiny ? true : false);
+ bumpshiny_ctrl->setEnabled(bumpshiny);
// Avatar Mode
// Enable Avatar Shaders
@@ -402,19 +402,12 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
if (LLViewerShaderMgr::sInitialized)
{
S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel;
- avatar_vp_enabled = (max_avatar_shader > 0) ? true : false;
+ avatar_vp_enabled = max_avatar_shader > 0;
}
ctrl_avatar_vp->setEnabled(avatar_vp_enabled);
- if (gSavedSettings.getBOOL("RenderAvatarVP") == false)
- {
- ctrl_avatar_cloth->setEnabled(false);
- }
- else
- {
- ctrl_avatar_cloth->setEnabled(true);
- }
+ ctrl_avatar_cloth->setEnabled(gSavedSettings.getBOOL("RenderAvatarVP"));
// Vertex Shaders, Global Shader Enable
// SL-12594 Basic shaders are always enabled. DJH TODO clean up now-orphaned state handling code
@@ -438,8 +431,8 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
- ((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? true : false) &&
- (ctrl_wind_light->get()) ? true : false;
+ bumpshiny_ctrl && bumpshiny_ctrl->get() &&
+ ctrl_wind_light->get();
ctrl_deferred->setEnabled(enabled);
#endif
@@ -455,7 +448,7 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
LLTextBox* shadow_text = getChild<LLTextBox>("RenderShadowDetailText");
// note, okay here to get from ctrl_deferred as it's twin, ctrl_deferred2 will alway match it
- enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO");// && (ctrl_deferred->get() ? true : false);
+ enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO");// && ctrl_deferred->get();
//ctrl_deferred->set(gSavedSettings.getBOOL("RenderDeferred"));