File melonds_PR2071.patch of Package melonds
From c6759c5fa6a27b6a7d78a7a417b71171cc479714 Mon Sep 17 00:00:00 2001
From: FireNX70 <firenx70@gmail.com>
Date: Tue, 18 Jun 2024 07:51:55 +0200
Subject: [PATCH] Fix VSync control being enabled in the wrong place
---
src/frontend/qt_sdl/VideoSettingsDialog.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/frontend/qt_sdl/VideoSettingsDialog.cpp b/src/frontend/qt_sdl/VideoSettingsDialog.cpp
index 7eebf5a43..477348487 100644
--- a/src/frontend/qt_sdl/VideoSettingsDialog.cpp
+++ b/src/frontend/qt_sdl/VideoSettingsDialog.cpp
@@ -151,6 +151,7 @@ void VideoSettingsDialog::onChange3DRenderer(int renderer)
auto& cfg = emuInstance->getGlobalConfig();
cfg.SetInt("3D.Renderer", renderer);
+ setVsyncControlEnable(UsesGL());
setEnabled();
emit updateVideoSettings(old_gl != UsesGL());
@@ -203,8 +204,6 @@ void VideoSettingsDialog::on_cbxGLResolution_currentIndexChanged(int idx)
auto& cfg = emuInstance->getGlobalConfig();
cfg.SetInt("3D.GL.ScaleFactor", idx+1);
- setVsyncControlEnable(UsesGL());
-
emit updateVideoSettings(false);
}