aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:13 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commita8d9478e46145ef2c71d6d4d461142c9d8c9b48d (patch)
tree91d405d3ba3f06a8059efa763504d5b9ef73fed2 /engines/cruise
parent030871774455aec5368afbc8af757b585aee687a (diff)
downloadscummvm-rg350-a8d9478e46145ef2c71d6d4d461142c9d8c9b48d.tar.gz
scummvm-rg350-a8d9478e46145ef2c71d6d4d461142c9d8c9b48d.tar.bz2
scummvm-rg350-a8d9478e46145ef2c71d6d4d461142c9d8c9b48d.zip
CRUISE: Let listSaves return list sorted on slot numbers.
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp
index 4d0ed2bf91..69e1bc4ad0 100644
--- a/engines/cruise/detection.cpp
+++ b/engines/cruise/detection.cpp
@@ -231,7 +231,6 @@ SaveStateList CruiseMetaEngine::listSaves(const char *target) const {
Common::String pattern("cruise.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) {
@@ -250,6 +249,8 @@ SaveStateList CruiseMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}