Skip to content

Commit

Permalink
TSAGE: Fix some errors in endGame().
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eriktorbjorn committed May 15, 2011
1 parent 9f05f88 commit 7ba345b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engines/tsage/ringworld_logic.cpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7ba345b

Please sign in to comment.