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.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index 6604587051..6e85ad369e 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -393,6 +393,11 @@ int AgiEngine::waitKey() {
_gfx->doUpdate();
}
+
+ // Have to clear it as original did not set this variable, and we do it in doPollKeyboard()
+ // Fixes bug #2823759
+ _game.keypress = 0;
+
return key;
}
@@ -409,6 +414,10 @@ int AgiEngine::waitAnyKey() {
break;
_gfx->doUpdate();
}
+
+ // Have to clear it as original did not set this variable, and we do it in doPollKeyboard()
+ _game.keypress = 0;
+
return key;
}