From 2a8cf41b33b6411fd4c4c9067d111eabec925206 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 10 Jan 2018 23:02:26 +0000 Subject: SUPERNOVA: Handle RTL and Quit while editing text --- engines/supernova/state.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index a0776b3382..f7bf70f15d 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -1524,7 +1524,7 @@ void GameManager::drawInventory() { } uint16 GameManager::getKeyInput(bool blockForPrintChar) { - while (true) { + while (!_vm->shouldQuit()) { _vm->updateEvents(); if (_keyPressed) { if (blockForPrintChar) { @@ -1550,6 +1550,7 @@ uint16 GameManager::getKeyInput(bool blockForPrintChar) { g_system->updateScreen(); g_system->delayMillis(_vm->_delay); } + return 0; } Common::EventType GameManager::getMouseInput() { @@ -1758,6 +1759,8 @@ void GameManager::edit(Common::String &input, int x, int y, uint length) { } getKeyInput(true); + if (_vm->shouldQuit()) + break; switch (_key.keycode) { case Common::KEYCODE_RETURN: case Common::KEYCODE_ESCAPE: -- cgit v1.2.3