From 92300268765dd5faf921c033b87f76c475539341 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 13 May 2019 22:52:41 +0100 Subject: DRASCULA: Fix loading game from launcher This was particularly an issue when the game had been saved in chapter 1 as in this case the load would happen too early and the game would crash. In other cases it was working but was not optimal (the gane loop was run once before it succeeded to load the game). This fixes bug #10959. --- engines/drascula/drascula.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 09962f161b..02fe2114a9 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -274,7 +274,11 @@ Common::Error DrasculaEngine::run() { // Check if a save is loaded from the launcher int directSaveSlotLoading = ConfMan.getInt("save_slot"); if (directSaveSlotLoading >= 0) { + // Set the current chapter to -1. This forces the load to happen + // later during the game loop, and not now. + currentChapter = -1; loadGame(directSaveSlotLoading); + currentChapter++; } checkCD(); -- cgit v1.2.3