aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/tsage/ringworld_logic.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 1dd905b3b6..58501172af 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -1333,9 +1333,20 @@ void RingworldGame::start() {
RING_INVENTORY._scanner._sceneNumber = 1;
RING_INVENTORY._ring._sceneNumber = 1;
+ int slot = -1;
+
+ if (ConfMan.hasKey("save_slot")) {
+ slot = ConfMan.getInt("save_slot");
+ Common::String file = _vm->generateSaveName(slot);
+ Common::InSaveFile *in = _vm->_system->getSavefileManager()->openForLoading(file);
+ if (in)
+ delete in;
+ else
+ slot = -1;
+ }
- if (ConfMan.hasKey("save_slot"))
- _globals->_sceneHandler._loadGameSlot = ConfMan.getInt("save_slot");
+ if (slot >= 0)
+ _globals->_sceneHandler._loadGameSlot = slot;
else
// Switch to the title screen
_globals->_sceneManager.setNewScene(1000);