diff options
Diffstat (limited to 'engines/agi/preagi_winnie.cpp')
-rw-r--r-- | engines/agi/preagi_winnie.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp index de8839b7bc..87d13bff3d 100644 --- a/engines/agi/preagi_winnie.cpp +++ b/engines/agi/preagi_winnie.cpp @@ -29,6 +29,7 @@ #include "graphics/cursorman.h" +#include "common/events.h" #include "common/savefile.h" #include "common/stream.h" @@ -796,12 +797,12 @@ void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) { // Show the mouse cursor for the menu CursorMan.showMouse(true); - while (!_vm->quit()) { + for (;;) { while (_vm->_system->getEventManager()->pollEvent(event)) { switch(event.type) { - case Common::EVENT_RTL: case Common::EVENT_QUIT: - return; + _vm->_system->quit(); + break; case Common::EVENT_MOUSEMOVE: x = event.mouse.x / 8; y = event.mouse.y / 8; @@ -1013,7 +1014,7 @@ phase2: if (parser(hdr.ofsDesc[iBlock] - _roomOffset, iBlock, roomdata) == IDI_WTP_PAR_BACK) goto phase1; } - while (!_vm->quit()) { + for (;;) { for (iBlock = 0; iBlock < IDI_WTP_MAX_BLOCK; iBlock++) { switch(parser(hdr.ofsBlock[iBlock] - _roomOffset, iBlock, roomdata)) { case IDI_WTP_PAR_GOTO: |