diff options
author | Torbjörn Andersson | 2015-04-06 08:29:46 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2015-04-06 08:29:46 +0200 |
commit | f3251b5bb65bbd4ecee7a0700e1f876987cc7644 (patch) | |
tree | 392fb64673702fd833a8f8b1ca1d4abca61fcfae /engines | |
parent | 661542b8c62a618f5d4b8265c8f9fb4d7e58a3a7 (diff) | |
download | scummvm-rg350-f3251b5bb65bbd4ecee7a0700e1f876987cc7644.tar.gz scummvm-rg350-f3251b5bb65bbd4ecee7a0700e1f876987cc7644.tar.bz2 scummvm-rg350-f3251b5bb65bbd4ecee7a0700e1f876987cc7644.zip |
MADS: Allow quitting in Rex's copy protection dialog
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/nebular/dialogs_nebular.cpp | 5 | ||||
-rw-r--r-- | engines/mads/nebular/game_nebular.cpp | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp index 9388aa2aa5..731e7e960d 100644 --- a/engines/mads/nebular/dialogs_nebular.cpp +++ b/engines/mads/nebular/dialogs_nebular.cpp @@ -439,10 +439,13 @@ void CopyProtectionDialog::show() { _vm->_screen.updateScreen(); while (!_vm->shouldQuit()) { - while (!_vm->_events->isKeyPressed()) { + while (!_vm->shouldQuit() && !_vm->_events->isKeyPressed()) { _vm->_events->delay(1); } + if (_vm->shouldQuit()) + break; + curKey = _vm->_events->getKey(); if (curKey.keycode == Common::KEYCODE_RETURN || curKey.keycode == Common::KEYCODE_KP_ENTER) diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp index ec7c6678e8..c96f1c6df9 100644 --- a/engines/mads/nebular/game_nebular.cpp +++ b/engines/mads/nebular/game_nebular.cpp @@ -56,7 +56,7 @@ ProtectionResult GameNebular::checkCopyProtection() { correctAnswer = dlg->isCorrectAnswer(); delete dlg; - if (!correctAnswer) { + if (!correctAnswer && !_vm->shouldQuit()) { dlg = new CopyProtectionDialog(_vm, true); dlg->show(); correctAnswer = dlg->isCorrectAnswer(); |