diff options
Diffstat (limited to 'engines/kyra/detection.cpp')
-rw-r--r-- | engines/kyra/detection.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index 95c4accd29..989a45b420 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -242,18 +242,13 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const { Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); Kyra::KyraEngine_v1::SaveHeader header; Common::String pattern = target; - pattern += ".???"; + pattern += ".###"; Common::StringArray filenames; filenames = saveFileMan->listSavefiles(pattern); - Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) SaveStateList saveList; for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) { - // Skip automatic final saves made by EOB for the purpose of party transfer - if (!scumm_stricmp(file->c_str() + file->size() - 3, "fin")) - continue; - // Obtain the last 3 digits of the filename, since they correspond to the save slot int slotNum = atoi(file->c_str() + file->size() - 3); @@ -273,6 +268,8 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const { } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } |