mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 06:41:51 +00:00
QUEEN: Fix loading savegame from Launcher
Loading a savegame from the Launcher for FOTAQ was broken by commit de879dd (QUEEN: Disable load/save until game is properly initialized). The patch comes from libretro to fix an issue described as "ScummVM allows you to load a previous save before the game is properly initialised. At best, this leads to undefined behaviour. Most of the time it causes a segfault." This commit allows loading save game earlier than the original patch so that loading savegames from the launcher works again. I don't know the details of the issue that was seen in libretro, but I tested this change with both address-sanitizer and valgrind on both Linux and macOS, and neither tool report any issue when loading a savegame from the launcher. This fixes bug #11327 (FOTAQ: Loading save game from the launcher doesn't work).
This commit is contained in:
parent
42a03ccc19
commit
60de72a73e
@ -352,6 +352,7 @@ Common::Error QueenEngine::run() {
|
||||
syncSoundSettings();
|
||||
|
||||
_logic->start();
|
||||
_gameStarted = true;
|
||||
if (ConfMan.hasKey("save_slot") && canLoadOrSave()) {
|
||||
loadGameState(ConfMan.getInt("save_slot"));
|
||||
}
|
||||
@ -364,9 +365,6 @@ Common::Error QueenEngine::run() {
|
||||
_logic->currentRoom(_logic->newRoom());
|
||||
_logic->changeRoom();
|
||||
_display->fullscreen(false);
|
||||
// From this point onwards it is safe to use the load/save
|
||||
// menu, so consider game to be 'started'
|
||||
_gameStarted = true;
|
||||
if (_logic->currentRoom() == _logic->newRoom()) {
|
||||
_logic->newRoom(0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user