diff options
author | Thierry Crozat | 2019-05-13 22:52:41 +0100 |
---|---|---|
committer | Thierry Crozat | 2019-05-13 22:56:57 +0100 |
commit | 92300268765dd5faf921c033b87f76c475539341 (patch) | |
tree | 9f711d5d9bc47343b567804cb93ceefe64277971 /engines | |
parent | d0f210aeec1dc8a3bd44c8ec053eabc56553c005 (diff) | |
download | scummvm-rg350-92300268765dd5faf921c033b87f76c475539341.tar.gz scummvm-rg350-92300268765dd5faf921c033b87f76c475539341.tar.bz2 scummvm-rg350-92300268765dd5faf921c033b87f76c475539341.zip |
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.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/drascula/drascula.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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(); |