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

athrxx noreply at scummvm.org
Wed Nov 17 00:51:04 UTC 2021


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:
b3e3befad8 KYRA: (LoK) - fix invalid mem access when quitting after being turned to stone


Commit: b3e3befad862b027f0ab1b5a03d055f9205007e8
    https://github.com/scummvm/scummvm/commit/b3e3befad862b027f0ab1b5a03d055f9205007e8
Author: athrxx (athrxx at scummvm.org)
Date: 2021-11-17T01:49:53+01:00

Commit Message:
KYRA: (LoK) - fix invalid mem access when quitting after being turned to stone

Changed paths:
    engines/kyra/engine/kyra_lok.cpp


diff --git a/engines/kyra/engine/kyra_lok.cpp b/engines/kyra/engine/kyra_lok.cpp
index 4c90e67657..099d3bbe08 100644
--- a/engines/kyra/engine/kyra_lok.cpp
+++ b/engines/kyra/engine/kyra_lok.cpp
@@ -441,6 +441,7 @@ void KyraEngine_LoK::mainLoop() {
 	static_cast<Debugger_LoK *>(getDebugger())->initialize();
 
 	_eventList.clear();
+	bool updateGfx = true;
 
 	while (!shouldQuit()) {
 		int32 frameTime = (int32)_system->getMillis();
@@ -459,6 +460,7 @@ void KyraEngine_LoK::mainLoop() {
 			_screen->setMouseCursor(1, 1, _shapes[0]);
 			removeHandItem();
 			_gui->buttonMenuCallback(nullptr);
+			updateGfx = !shouldQuit();
 			_deathHandler = -1;
 		}
 
@@ -487,7 +489,7 @@ void KyraEngine_LoK::mainLoop() {
 		if (skipFlag())
 			resetSkipFlag();
 
-		delay((frameTime + _gameSpeed) - _system->getMillis(), true, true);
+		delay((frameTime + _gameSpeed) - _system->getMillis(), updateGfx, true);
 	}
 }
 




More information about the Scummvm-git-logs mailing list