aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/dialogs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/dialogs.cpp')
-rw-r--r--engines/mads/dialogs.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/mads/dialogs.cpp b/engines/mads/dialogs.cpp
index 23015413b8..8bc73e55dc 100644
--- a/engines/mads/dialogs.cpp
+++ b/engines/mads/dialogs.cpp
@@ -331,11 +331,13 @@ void TextDialog::show() {
// Wait for mouse click
do {
_vm->_events->waitForNextFrame();
- } while (!_vm->shouldQuit() && !_vm->_events->_mouseReleased);
+ } while (!_vm->shouldQuit() && !_vm->_events->isKeyPressed() && !_vm->_events->_mouseReleased);
- // Allow the mouse release to be gobbled up
- if (!_vm->shouldQuit())
+ // Allow the mouse release or keypress to be gobbled up
+ if (!_vm->shouldQuit()) {
_vm->_events->waitForNextFrame();
+ _vm->_events->_pendingKeys.clear();
+ }
}
/*------------------------------------------------------------------------*/