diff options
author | Johannes Schickel | 2008-09-14 14:08:14 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-09-14 14:08:14 +0000 |
commit | 9ec7c3eaca458fd1647c51deab0632f5427d5f2d (patch) | |
tree | 76cc85d97dab3d41b27f05c325031c0475953208 | |
parent | ba58358c8d3fce729c834f0f421864a56fb80929 (diff) | |
download | scummvm-rg350-9ec7c3eaca458fd1647c51deab0632f5427d5f2d.tar.gz scummvm-rg350-9ec7c3eaca458fd1647c51deab0632f5427d5f2d.tar.bz2 scummvm-rg350-9ec7c3eaca458fd1647c51deab0632f5427d5f2d.zip |
Added a hack in KyraMetaEngine::listSaves to prevent slot 0 from being listed. Check comment for additional information.
svn-id: r34521
-rw-r--r-- | engines/kyra/detection.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index f2c929c6fb..834f9f70c6 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -1135,7 +1135,10 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const { // Obtain the last 3 digits of the filename, since they correspond to the save slot int slotNum = atoi(file->c_str() + file->size() - 3); - if (slotNum >= 0 && slotNum <= 999) { + // HACK: Until we have a way to check whether a save is deletable in our launcher delete savegame dialog. + // We do not list slot 0 here, since it's for restarting the game and it should never be deleted. + // The downside of it is of course we can not load it via the menu and it isn't listed via --list-saves. + if (slotNum > 0 && slotNum <= 999) { Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str()); if (in) { if (Kyra::KyraEngine_v1::readSaveHeader(in, false, header) == Kyra::KyraEngine_v1::kRSHENoError) { @@ -1154,7 +1157,7 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const { } void KyraMetaEngine::removeSaveState(const char *target, int slot) const { - // Slot 0 can't be delted, it's for restarting the game(s) + // Slot 0 can't be deleted, it's for restarting the game(s) if (slot == 0) return; |