aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sword1/sword1.cpp2
-rw-r--r--gui/launcher.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 1a7ae87f66..c20f1c1422 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -696,7 +696,7 @@ int SwordEngine::go() {
int saveSlot = ConfMan.getInt("save_slot");
// Savegames are numbered starting from 1 in the dialog window,
// but their filenames are numbered starting from 0.
- if (saveSlot >= 0 && _control->savegamesExist() &&_control->restoreGameFromFile(saveSlot)) {
+ if (saveSlot >= 0 && _control->savegamesExist() && _control->restoreGameFromFile(saveSlot)) {
_control->doRestore();
} else if (_control->savegamesExist()) {
_systemVars.controlPanelMode = CP_NEWGAME;
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 17fdbaddbb..df73df9526 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -969,6 +969,8 @@ void LauncherDialog::loadGame(int item) {
String filename = saveList[idx].filename();
printf("Deleting file: %s\n", filename.c_str());
saveFileMan->removeSavefile(filename.c_str());
+ if ((saveList.size() - 1) == 0)
+ ConfMan.setInt("save_slot", -1);
}
// Load the savegame
else {