aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:14 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commitcea96e4a39ee66f3b2ad45cb9b69b373025788c3 (patch)
treed867a9a2ea97528d5952f7becb8c63dd4774f25f
parentce8998760d4a3ae5432158754d50b1d5af7b662f (diff)
downloadscummvm-rg350-cea96e4a39ee66f3b2ad45cb9b69b373025788c3.tar.gz
scummvm-rg350-cea96e4a39ee66f3b2ad45cb9b69b373025788c3.tar.bz2
scummvm-rg350-cea96e4a39ee66f3b2ad45cb9b69b373025788c3.zip
SCI: Let listSaves return list sorted on slot numbers.
-rw-r--r--engines/sci/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 05c00bff0b..985e12a7f6 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -727,7 +727,6 @@ SaveStateList SciMetaEngine::listSaves(const char *target) const {
pattern += ".###";
filenames = saveFileMan->listSavefiles(pattern);
- sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
int slotNr = 0;
@@ -760,6 +759,8 @@ SaveStateList SciMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}