aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/dialogs/dialogs_query.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/xeen/dialogs/dialogs_query.cpp')
-rw-r--r--engines/xeen/dialogs/dialogs_query.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/xeen/dialogs/dialogs_query.cpp b/engines/xeen/dialogs/dialogs_query.cpp
index 79f46826cd..3b44b54072 100644
--- a/engines/xeen/dialogs/dialogs_query.cpp
+++ b/engines/xeen/dialogs/dialogs_query.cpp
@@ -68,8 +68,11 @@ bool Confirm::execute(const Common::String &msg, int mode) {
bool result = false;
while (!_vm->shouldExit()) {
- events.pollEvents();
- checkEvents(_vm);
+ _buttonValue = 0;
+ while (!_vm->shouldExit() && !_buttonValue) {
+ events.pollEvents();
+ checkEvents(_vm);
+ }
if ((mode & 0x80) || _buttonValue == Common::KEYCODE_ESCAPE
|| _buttonValue == Common::KEYCODE_n)
@@ -81,6 +84,7 @@ bool Confirm::execute(const Common::String &msg, int mode) {
}
}
+ events.clearEvents();
w.close();
return result;
}