aboutsummaryrefslogtreecommitdiff
path: root/engines/made/script.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-03-14 13:42:43 +0000
committerFilippos Karapetis2009-03-14 13:42:43 +0000
commit6225bf905f95addf161790fb74268cf5fb0954c7 (patch)
tree5af9fbc930e97d098ea76b667972fa86369dd602 /engines/made/script.cpp
parent7da95bbd0072fefa84460b9bbdbbd282304d2235 (diff)
downloadscummvm-rg350-6225bf905f95addf161790fb74268cf5fb0954c7.tar.gz
scummvm-rg350-6225bf905f95addf161790fb74268cf5fb0954c7.tar.bz2
scummvm-rg350-6225bf905f95addf161790fb74268cf5fb0954c7.zip
Do not update the screen while waiting
svn-id: r39390
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;
}