aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/keyboard.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2016-02-03 02:40:01 +0100
committerMartin Kiewitz2016-02-03 02:40:01 +0100
commit34117170f2955e854a93925a652af37575361b44 (patch)
treef63d6592f41195be8999ce8101c3e0e15d8cb6d0 /engines/agi/keyboard.cpp
parent778c1ddb69bb45b6992fdc9b8fff6b2c8d3e22ac (diff)
downloadscummvm-rg350-34117170f2955e854a93925a652af37575361b44.tar.gz
scummvm-rg350-34117170f2955e854a93925a652af37575361b44.tar.bz2
scummvm-rg350-34117170f2955e854a93925a652af37575361b44.zip
AGI: Change cycle delay handling, seems to fix GR
Removed pollTimer() Renamed pause() to wait() Doing 10 msec delays instead of at least 50 msec per EventProcess Seems to fix weird Gold Rush ingame timer issue?! bug #4147
Diffstat (limited to 'engines/agi/keyboard.cpp')
-rw-r--r--engines/agi/keyboard.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index 1809d579e7..169c294e4d 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -540,14 +540,10 @@ int AgiEngine::waitKey() {
debugC(3, kDebugLevelInput, "waiting...");
while (!(shouldQuit() || _restartGame || getFlag(VM_FLAG_RESTORE_JUST_RAN))) {
- pollTimer();
+ wait(10);
key = doPollKeyboard();
if (key == AGI_KEY_ENTER || key == AGI_KEY_ESCAPE || key == AGI_MOUSE_BUTTON_LEFT)
break;
-
- pollTimer();
-
- g_system->updateScreen();
}
return key;
}
@@ -559,11 +555,10 @@ int AgiEngine::waitAnyKey() {
debugC(3, kDebugLevelInput, "waiting... (any key)");
while (!(shouldQuit() || _restartGame)) {
- pollTimer();
+ wait(10);
key = doPollKeyboard();
if (key)
break;
- g_system->updateScreen();
}
return key;
}
@@ -577,7 +572,7 @@ int AgiEngine::getKeypress() {
int k;
while (_keyQueueStart == _keyQueueEnd) // block
- pollTimer();
+ wait(10);
keyDequeue(k);