aboutsummaryrefslogtreecommitdiff
path: root/engines/made/script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/made/script.cpp')
-rw-r--r--engines/made/script.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/made/script.cpp b/engines/made/script.cpp
index 7a7aa5407f..79f93f3b23 100644
--- a/engines/made/script.cpp
+++ b/engines/made/script.cpp
@@ -159,7 +159,11 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) {
/* We sleep a little after 500 opcodes to reduce the CPU load.
*/
if (++opcodeSleepCounter > 500) {
- _vm->_screen->updateScreenAndWait(5);
+ uint32 startTime = _vm->_system->getMillis();
+ while (_vm->_system->getMillis() < startTime + 5) {
+ _vm->handleEvents();
+ _vm->_system->delayMillis(5);
+ }
opcodeSleepCounter = 0;
}