diff options
author | Bendegúz Nagy | 2016-08-18 21:12:36 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 5cb1d02972bd13130e6b177dea6e35045ae54055 (patch) | |
tree | 0c02803fef31dc2d1d6b31f47af8b4136a618e62 /engines/dm/dm.cpp | |
parent | cefc231968412af089b6957173f9162b9852e94e (diff) | |
download | scummvm-rg350-5cb1d02972bd13130e6b177dea6e35045ae54055.tar.gz scummvm-rg350-5cb1d02972bd13130e6b177dea6e35045ae54055.tar.bz2 scummvm-rg350-5cb1d02972bd13130e6b177dea6e35045ae54055.zip |
DM: Fix double load when loading from launcher
Diffstat (limited to 'engines/dm/dm.cpp')
-rw-r--r-- | engines/dm/dm.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index dc0655bf8f..634ddb51c3 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -269,7 +269,7 @@ void DMEngine::f463_initializeGame() { _objectMan->loadObjectNames(); _eventMan->initMouse(); - int16 saveSlot = 1; + int16 saveSlot = -1; do { // if loading from the launcher if (ConfMan.hasKey("save_slot")) { @@ -278,11 +278,12 @@ void DMEngine::f463_initializeGame() { f441_processEntrance(); if (_engineShouldQuit) return; - } - if (_g298_newGame == k0_modeLoadSavedGame) { // if resume was clicked, bring up ScummVM load screen - GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); - saveSlot = dialog->runModalWithCurrentTarget(); - delete dialog; + + if (_g298_newGame == k0_modeLoadSavedGame) { // if resume was clicked, bring up ScummVM load screen + GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false); + saveSlot = dialog->runModalWithCurrentTarget(); + delete dialog; + } } } while (f435_loadgame(saveSlot) != k1_LoadgameSuccess); |