diff options
author | Colin Snover | 2017-09-23 14:38:49 -0500 |
---|---|---|
committer | Colin Snover | 2017-09-23 20:57:02 -0500 |
commit | 602de8363b0c35e5fa4525432cc176b1843b808d (patch) | |
tree | 27681551f8a4b99fa35bb199ecd8bbe4b4ccd8e9 /engines/sci | |
parent | 9c28c25b67c82f9a4fae6b9e85b73506b5bb6226 (diff) | |
download | scummvm-rg350-602de8363b0c35e5fa4525432cc176b1843b808d.tar.gz scummvm-rg350-602de8363b0c35e5fa4525432cc176b1843b808d.tar.bz2 scummvm-rg350-602de8363b0c35e5fa4525432cc176b1843b808d.zip |
SCI32: Fix infinite reload in RAMA when loading from launcher
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/guest_additions.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/engine/guest_additions.cpp b/engines/sci/engine/guest_additions.cpp index 6d7bbea7d4..eee26aca3c 100644 --- a/engines/sci/engine/guest_additions.cpp +++ b/engines/sci/engine/guest_additions.cpp @@ -740,6 +740,14 @@ bool GuestAdditions::restoreFromLauncher() const { // which will automatically return the `_delayedRestoreGameId` instead // of prompting the user for a save game invokeSelector(g_sci->getGameObject(), SELECTOR(restore)); + + // The normal save game system resets _delayedRestoreGameId with a + // call to `EngineState::reset`, but RAMA uses a custom save game + // system which does not reset the engine, so we need to clear the + // ID here or the engine will just try to restore the game forever + if (g_sci->getGameId() == GID_RAMA) { + _state->_delayedRestoreGameId = -1; + } } _restoring = false; |