summaryrefslogtreecommitdiff
path: root/indra/newview/llviewercontrol.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-11-09 17:17:49 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-11-09 17:17:49 +0200
commit768b7a4d33b64dc3e9d7f7c0c384bb2aa37b458b (patch)
tree9f13912e908ee4b4625f2537a0ccccbd143009b0 /indra/newview/llviewercontrol.cpp
parentb6afa7f7dd5eb4f6df9580a25fbffb491ccef921 (diff)
SL-16330 Clean up vertical sync handling, add to UI
Diffstat (limited to 'indra/newview/llviewercontrol.cpp')
-rw-r--r--indra/newview/llviewercontrol.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 76dc9a6790..3e7459ee8a 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -241,6 +241,12 @@ static bool handleAnisotropicChanged(const LLSD& newvalue)
return true;
}
+static bool handleVSyncChanged(const LLSD& newvalue)
+{
+ gViewerWindow->getWindow()->toggleVSync(newvalue.asBoolean());
+ return true;
+}
+
static bool handleVolumeLODChanged(const LLSD& newvalue)
{
LLVOVolume::sLODFactor = llclamp((F32) newvalue.asReal(), 0.01f, MAX_LOD_FACTOR);
@@ -665,6 +671,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleRenderBumpChanged, _2));
gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
+ gSavedSettings.getControl("RenderVSyncEnable")->getSignal()->connect(boost::bind(&handleVSyncChanged, _2));
gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _2));
gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _2));