From 5cb1d02972bd13130e6b177dea6e35045ae54055 Mon Sep 17 00:00:00 2001 From: Bendegúz Nagy Date: Thu, 18 Aug 2016 21:12:36 +0200 Subject: DM: Fix double load when loading from launcher --- engines/dm/dm.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'engines/dm/dm.cpp') 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); -- cgit v1.2.3