diff options
Diffstat (limited to 'engines/agi/preagi_common.cpp')
-rw-r--r-- | engines/agi/preagi_common.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/agi/preagi_common.cpp b/engines/agi/preagi_common.cpp index 3cd04351f7..5d99dfa7f9 100644 --- a/engines/agi/preagi_common.cpp +++ b/engines/agi/preagi_common.cpp @@ -23,6 +23,8 @@ * */ +#include "common/events.h" + #include "agi/preagi.h" #include "agi/font.h" #include "agi/graphics.h" @@ -120,12 +122,11 @@ void PreAgiEngine::printStrXOR(char *szMsg) { int PreAgiEngine::getSelection(SelectionTypes type) { Common::Event event; - while (!quit()) { + for (;;) { while (_eventMan->pollEvent(event)) { switch(event.type) { - case Common::EVENT_RTL: case Common::EVENT_QUIT: - return 0; + _system->quit(); case Common::EVENT_RBUTTONUP: return 0; case Common::EVENT_LBUTTONUP: |