Skip to content

Commit

Permalink
XEEN: Fix freeze on the Confirm dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Feb 25, 2018
1 parent d9ab653 commit ce48271
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions engines/xeen/dialogs_query.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ce48271

Please sign in to comment.