From 76ff4c700166d69b416dae324ee616ab57265c34 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 13 Oct 2012 21:06:02 +0300 Subject: SCI: Hopefully fix bug #3565505 - "SCI : crash when loading a savegame" This bug occurs because in the cases specified in the bug report, the main loop hasn't run fully yet, and there is a mini loop running instead (e.g. inside Print()) Hopefully, this catches most cases where the crash occurs, but it needs more testing to find if there is any other such case. --- engines/sci/detection.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engines/sci/detection.cpp') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 58ac5f1fa6..8695d97621 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -834,12 +834,16 @@ Common::Error SciEngine::saveGameState(int slot, const Common::String &desc) { return Common::kNoError; } +// Before enabling the load option in the ScummVM menu, the main game loop must +// have run at least once. When the game loop runs, kGameIsRestarting is invoked, +// thus the speed throttler is initialized. Hopefully fixes bug #3565505. + bool SciEngine::canLoadGameStateCurrently() { - return !_gamestate->executionStackBase; + return !_gamestate->executionStackBase && (_gamestate->_throttleLastTime > 0 || _gamestate->_throttleTrigger); } bool SciEngine::canSaveGameStateCurrently() { - return !_gamestate->executionStackBase; + return !_gamestate->executionStackBase && (_gamestate->_throttleLastTime > 0 || _gamestate->_throttleTrigger); } } // End of namespace Sci -- cgit v1.2.3 From 146d00a799f425a0871709bdf75557a0d7be9424 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 22 Oct 2012 12:19:13 +0300 Subject: SCI: Add the Inside the Chest / Benind the Developer's Shield demo --- engines/sci/detection.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/sci/detection.cpp') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 8695d97621..ebad3d039a 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -103,6 +103,7 @@ static const PlainGameDescriptor s_sciGameTitles[] = { {"pq4", "Police Quest IV: Open Season"}, // floppy is SCI2, CD SCI2.1 {"qfg4", "Quest for Glory IV: Shadows of Darkness"}, // floppy is SCI2, CD SCI2.1 // === SCI2.1 games ======================================================== + {"chest", "Inside the Chest"}, // aka Behind the Developer's Shield {"gk2", "The Beast Within: A Gabriel Knight Mystery"}, // TODO: Inside The Chest/Behind the Developer's Shield {"kq7", "King's Quest VII: The Princeless Bride"}, @@ -132,6 +133,7 @@ static const GameIdStrToEnum s_gameIdStrToEnum[] = { { "astrochicken", GID_ASTROCHICKEN }, { "camelot", GID_CAMELOT }, { "castlebrain", GID_CASTLEBRAIN }, + { "chest", GID_CHEST }, { "christmas1988", GID_CHRISTMAS1988 }, { "christmas1990", GID_CHRISTMAS1990 }, { "christmas1992", GID_CHRISTMAS1992 }, @@ -208,6 +210,7 @@ struct OldNewIdTableEntry { }; static const OldNewIdTableEntry s_oldNewTable[] = { + { "archive", "chest", SCI_VERSION_NONE }, { "arthur", "camelot", SCI_VERSION_NONE }, { "brain", "castlebrain", SCI_VERSION_1_MIDDLE }, // Amiga { "brain", "castlebrain", SCI_VERSION_1_LATE }, -- cgit v1.2.3