diff options
author | eriktorbjorn | 2011-05-15 22:49:19 +0200 |
---|---|---|
committer | eriktorbjorn | 2011-05-15 22:49:19 +0200 |
commit | 7ba345be57c4e8f98d4cad2dcc64a088d60ed9ff (patch) | |
tree | 46bded8fd90ef74505f5f036b1c85b65a9300673 /engines/tsage | |
parent | 9f05f8805dfda0892b809e268c2c4869ca33d4ff (diff) | |
download | scummvm-rg350-7ba345be57c4e8f98d4cad2dcc64a088d60ed9ff.tar.gz scummvm-rg350-7ba345be57c4e8f98d4cad2dcc64a088d60ed9ff.tar.bz2 scummvm-rg350-7ba345be57c4e8f98d4cad2dcc64a088d60ed9ff.zip |
TSAGE: Fix some errors in endGame().
Save slot 0 is valid. It's -1 that indicates cancelling. Also, we
need to check if the user tried to quit, to avoid a nasty loop of
hard-to-terminate restore dialogs.
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/ringworld_logic.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp index 82331ba0e6..a03c4081da 100644 --- a/engines/tsage/ringworld_logic.cpp +++ b/engines/tsage/ringworld_logic.cpp @@ -1409,11 +1409,11 @@ void RingworldGame::endGame(int resNum, int lineNum) { // Savegames exist, so prompt for Restore/Restart bool breakFlag; do { - if (MessageDialog::show(msg, RESTART_BTN_STRING, RESTORE_BTN_STRING) == 0) { + if (MessageDialog::show(msg, RESTART_BTN_STRING, RESTORE_BTN_STRING) == 0 || _vm->shouldQuit()) { breakFlag = true; } else { handleSaveLoad(false, _globals->_sceneHandler._loadGameSlot, _globals->_sceneHandler._saveName); - breakFlag = _globals->_sceneHandler._loadGameSlot > 0; + breakFlag = _globals->_sceneHandler._loadGameSlot >= 0; } } while (!breakFlag); } |