[Scummvm-cvs-logs] SF.net SVN: scummvm:[48149] scummvm/trunk/engines/made/script.cpp

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Sat Feb 27 19:54:22 CET 2010


Revision: 48149
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48149&view=rev
Author:   mthreepwood
Date:     2010-02-27 18:54:21 +0000 (Sat, 27 Feb 2010)

Log Message:
-----------
Check if we should quit on every opcode call instead of after every 500. Fixes bug #2960238.

Modified Paths:
--------------
    scummvm/trunk/engines/made/script.cpp

Modified: scummvm/trunk/engines/made/script.cpp
===================================================================
--- scummvm/trunk/engines/made/script.cpp	2010-02-27 17:02:58 UTC (rev 48148)
+++ scummvm/trunk/engines/made/script.cpp	2010-02-27 18:54:21 UTC (rev 48149)
@@ -145,7 +145,7 @@
 	_codeBase = _vm->_dat->getObject(_runningScriptObjectIndex)->getData();
 	_codeIp = _codeBase;
 
-	while (true) {
+	while (!_vm->shouldQuit()) {
 		byte opcode = readByte();
 
 		if (opcode >= 1 && opcode <= _commandsMax) {
@@ -160,9 +160,6 @@
 		if (++opcodeSleepCounter > 500) {
 			_vm->_screen->updateScreenAndWait(5);
 			opcodeSleepCounter = 0;
-			if (_vm->shouldQuit()) {
-				break;
-			}
 		}
 
 	}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list