[Scummvm-git-logs] scummvm master -> f17604cef57a0c90e349e27b2334df90130a3a60

lephilousophe noreply at scummvm.org
Sat Jan 21 15:30:10 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f17604cef5 AGS: Don't set VSync when it's not needed


Commit: f17604cef57a0c90e349e27b2334df90130a3a60
    https://github.com/scummvm/scummvm/commit/f17604cef57a0c90e349e27b2334df90130a3a60
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-01-21T16:28:40+01:00

Commit Message:
AGS: Don't set VSync when it's not needed

Changed paths:
    engines/ags/engine/gfx/ali_3d_scummvm.cpp


diff --git a/engines/ags/engine/gfx/ali_3d_scummvm.cpp b/engines/ags/engine/gfx/ali_3d_scummvm.cpp
index 6b938985b73..8686d75e117 100644
--- a/engines/ags/engine/gfx/ali_3d_scummvm.cpp
+++ b/engines/ags/engine/gfx/ali_3d_scummvm.cpp
@@ -225,6 +225,10 @@ bool ScummVMRendererGraphicsDriver::DoesSupportVsyncToggle() {
 }
 
 bool ScummVMRendererGraphicsDriver::SetVsync(bool enabled) {
+	if (_mode.Vsync == enabled) {
+		return _mode.Vsync;
+	}
+
 	if (g_system->hasFeature(OSystem::kFeatureVSync)) {
 		g_system->beginGFXTransaction();
 		g_system->setFeatureState(OSystem::kFeatureVSync, enabled);




More information about the Scummvm-git-logs mailing list