aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:14 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commitd1cf867fc4fbf12e00dbf0ed2c4a6288cf28703b (patch)
tree07e176e449c6d3834f40936f46a591809dfda64d
parentcea96e4a39ee66f3b2ad45cb9b69b373025788c3 (diff)
downloadscummvm-rg350-d1cf867fc4fbf12e00dbf0ed2c4a6288cf28703b.tar.gz
scummvm-rg350-d1cf867fc4fbf12e00dbf0ed2c4a6288cf28703b.tar.bz2
scummvm-rg350-d1cf867fc4fbf12e00dbf0ed2c4a6288cf28703b.zip
SCUMM: Let listSaves return list sorted on slot numbers.
-rw-r--r--engines/scumm/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index e5bbad15e6..9264a6443b 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -1271,7 +1271,6 @@ SaveStateList ScummMetaEngine::listSaves(const char *target) const {
pattern += ".s##";
filenames = saveFileMan->listSavefiles(pattern);
- 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) {
@@ -1288,6 +1287,8 @@ SaveStateList ScummMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}