aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/savegame.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2016-03-02 19:34:40 +0100
committerMartin Kiewitz2016-03-02 19:34:40 +0100
commit858859294733f080ea2902469dfd392635464a21 (patch)
treeac477dbf5ac91c3fc66fc30680b7b8e64634d84a /engines/sci/engine/savegame.cpp
parent7ee2af41984500ac580a904a15be498e625cf5c3 (diff)
downloadscummvm-rg350-858859294733f080ea2902469dfd392635464a21.tar.gz
scummvm-rg350-858859294733f080ea2902469dfd392635464a21.tar.bz2
scummvm-rg350-858859294733f080ea2902469dfd392635464a21.zip
SCI32: Don't do a syncWithScripts on restore from launcher
Causes issues in at least gk1 (option + inventory plane are shown) Game::restore is not called, when doing restores from launcher, so in the original interpreter this script code wasn't called either. Fixes option + inventory planes etc. being shown right after restoring via launcher, when original save/load dialogs were disabled.
Diffstat (limited to 'engines/sci/engine/savegame.cpp')
-rw-r--r--engines/sci/engine/savegame.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 18cee3321f..ae7ab431f8 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -1081,8 +1081,13 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
// We MUST NOT delete all planes/screen items. At least Space Quest 6 has a few in memory like for example
// the options plane, which are not re-added and are in memory all the time right from the start of the
// game. Sierra SCI32 did not clear planes, only scripts cleared the ones inside planes::elements.
- if (getSciVersion() >= SCI_VERSION_2)
- g_sci->_gfxFrameout->syncWithScripts(false);
+ if (getSciVersion() >= SCI_VERSION_2) {
+ if (!s->_delayedRestoreFromLauncher) {
+ // Only do it, when we are restoring regulary and not from launcher
+ // As it could result in option planes etc. on the screen (happens in gk1)
+ g_sci->_gfxFrameout->syncWithScripts(false);
+ }
+ }
#endif
s->reset(true);
@@ -1131,6 +1136,8 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
// signal restored game to game scripts
s->gameIsRestarting = GAMEISRESTARTING_RESTORE;
+
+ s->_delayedRestoreFromLauncher = false;
}
bool get_savegame_metadata(Common::SeekableReadStream *stream, SavegameMetadata *meta) {