From ce48271a59e7450df8a4f9853a65582e8d54bc64 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 24 Feb 2018 22:02:48 -0500 Subject: XEEN: Fix freeze on the Confirm dialog --- engines/xeen/dialogs_query.cpp | 9 ++++----- 1 file 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) -- cgit v1.2.3