From d20d701ef08558e45abdd76ff8c4099f11d2e4e7 Mon Sep 17 00:00:00 2001 From: codeman4033 <92231243+codeman4033@users.noreply.github.com> Date: Wed, 10 Jun 2026 08:24:38 -0500 Subject: [PATCH] OpenGL: Clamp vsync to valid value (#1937) --- src/gui/wxgui/canvas/OpenGLCanvas.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/wxgui/canvas/OpenGLCanvas.cpp b/src/gui/wxgui/canvas/OpenGLCanvas.cpp index 0eb76a3d..d80d696e 100644 --- a/src/gui/wxgui/canvas/OpenGLCanvas.cpp +++ b/src/gui/wxgui/canvas/OpenGLCanvas.cpp @@ -119,6 +119,7 @@ public: void UpdateVSyncState() { int configValue = GetConfig().vsync.GetValue(); + configValue = configValue > 0 ? 1 : 0; if(m_activeVSyncState != configValue) { #if BOOST_OS_WINDOWS @@ -175,4 +176,4 @@ bool GLCanvasManager::MakeCurrent(bool padView) return false; m_glContext->SetCurrent(*canvas); return true; -} \ No newline at end of file +}