[Scummvm-git-logs] scummvm master -> 5670160aa72ac21baf15e7b61108f192fd5859f9

neuromancer noreply at scummvm.org
Wed Aug 28 20:13:17 UTC 2024


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:
5670160aa7 HYPNO: disable vsync for arcade sequences


Commit: 5670160aa72ac21baf15e7b61108f192fd5859f9
    https://github.com/scummvm/scummvm/commit/5670160aa72ac21baf15e7b61108f192fd5859f9
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-28T22:04:00+02:00

Commit Message:
HYPNO: disable vsync for arcade sequences

Changed paths:
    engines/hypno/arcade.cpp


diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index 84fad5d4177..94a1a489a55 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -279,8 +279,13 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 	_objMissesAllowed[0] = arc->objMissesAllowed[0];
 	_objMissesAllowed[1] = arc->objMissesAllowed[1];
 
+	bool vsync = g_system->getFeatureState(OSystem::kFeatureVSync);
+	// Disable vsync for arcade sequences, since these require a fixed frame rate
+	g_system->setFeatureState(OSystem::kFeatureVSync, false);
+
 	debugC(1, kHypnoDebugArcade, "Using frame delay: %d", arc->frameDelay);
 	Graphics::FrameLimiter limiter(g_system, 1000.0 / arc->frameDelay);
+	limiter.startFrame();
 
 	Common::Event event;
 	while (!shouldQuit()) {
@@ -562,6 +567,9 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 		limiter.startFrame();
 	}
 
+	// Restore vsync state
+	g_system->setFeatureState(OSystem::kFeatureVSync, vsync);
+
 	// Deallocate shoots
 	for (Shoots::iterator it = _shoots.begin(); it != _shoots.end(); ++it) {
 		if (it->video && it->video->decoder)




More information about the Scummvm-git-logs mailing list