aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/keyboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi/keyboard.cpp')
-rw-r--r--engines/agi/keyboard.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index 5525cfef99..d98e58d4d9 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -374,7 +374,7 @@ int AgiEngine::waitKey() {
}
debugC(3, kDebugLevelInput, "waiting...");
- while (!shouldQuit()) {
+ while (!(shouldQuit() || restartGame)) {
_gfx->pollTimer(); /* msdos driver -> does nothing */
key = doPollKeyboard();
if (key == KEY_ENTER || key == KEY_ESCAPE || key == BUTTON_LEFT)
@@ -397,7 +397,7 @@ int AgiEngine::waitAnyKey() {
}
debugC(3, kDebugLevelInput, "waiting...");
- while (!shouldQuit()) {
+ while (!(shouldQuit() || restartGame)) {
_gfx->pollTimer(); /* msdos driver -> does nothing */
key = doPollKeyboard();
if (key)