aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-02-24 22:02:48 -0500
committerPaul Gilbert2018-02-24 22:02:48 -0500
commitce48271a59e7450df8a4f9853a65582e8d54bc64 (patch)
treea8230e451e887d213f7913f64b4a124e0b636800
parentd9ab653052158ba37cb9e2a00efe1ea716f4b665 (diff)
downloadscummvm-rg350-ce48271a59e7450df8a4f9853a65582e8d54bc64.tar.gz
scummvm-rg350-ce48271a59e7450df8a4f9853a65582e8d54bc64.tar.bz2
scummvm-rg350-ce48271a59e7450df8a4f9853a65582e8d54bc64.zip
XEEN: Fix freeze on the Confirm dialog
-rw-r--r--engines/xeen/dialogs_query.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/xeen/dialogs_query.cpp b/engines/xeen/dialogs_query.cpp
index 75de3ee3ea..5fbf35f1c4 100644
--- a/engines/xeen/dialogs_query.cpp
+++ b/engines/xeen/dialogs_query.cpp
@@ -37,7 +37,6 @@ bool Confirm::execute(const Common::String &msg, int mode) {
EventsManager &events = *_vm->_events;
Windows &windows = *_vm->_windows;
SpriteResource confirmSprites;
- bool result = false;
confirmSprites.load("confirm.icn");
addButton(Common::Rect(129, 112, 153, 122), Common::KEYCODE_y, &confirmSprites);
@@ -66,11 +65,11 @@ bool Confirm::execute(const Common::String &msg, int mode) {
w.update();
events.clearEvents();
+ bool result = false;
+
while (!_vm->shouldExit()) {
- while (!_vm->shouldExit() && !_buttonValue) {
- events.pollEvents();
- checkEvents(_vm);
- }
+ events.pollEvents();
+ checkEvents(_vm);
if ((mode & 0x80) || _buttonValue == Common::KEYCODE_ESCAPE
|| _buttonValue == Common::KEYCODE_n)