aboutsummaryrefslogtreecommitdiff
path: root/windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'windows.cpp')
-rw-r--r--windows.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/windows.cpp b/windows.cpp
index c4d3b8822f..ca8bd73979 100644
--- a/windows.cpp
+++ b/windows.cpp
@@ -915,11 +915,11 @@ void updateScreen(Scumm *s) {
wm->writeToScreen();
}
-void waitForTimer(Scumm *s) {
+void waitForTimer(Scumm *s, int delay) {
+ wm->handleMessage();
if (!veryFastMode) {
- Sleep(10);
+ Sleep(delay*10);
}
- wm->handleMessage();
}
void initGraphics(Scumm *s, bool fullScreen) {
@@ -1030,10 +1030,7 @@ int main(int argc, char* argv[]) {
tmp=1;
}
- while(tmp>0) {
- waitForTimer(&scumm);
- tmp--;
- }
+ waitForTimer(&scumm, tmp);
} while(1);
return 0;