mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
Check if we should quit on every opcode call instead of after every 500. Fixes bug #2960238.
svn-id: r48149
This commit is contained in:
parent
22e5a557b7
commit
eda17df00c
@ -145,7 +145,7 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) {
|
||||
_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 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) {
|
||||
if (++opcodeSleepCounter > 500) {
|
||||
_vm->_screen->updateScreenAndWait(5);
|
||||
opcodeSleepCounter = 0;
|
||||
if (_vm->shouldQuit()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user