aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:13 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commite31a4a409e21c780653d805201149a1142464813 (patch)
tree1162172bb2b62f168b39365c8739190ce084b84d
parent99c59cdeb28ac7e6d80a9343c3b2ca5af9b46b66 (diff)
downloadscummvm-rg350-e31a4a409e21c780653d805201149a1142464813.tar.gz
scummvm-rg350-e31a4a409e21c780653d805201149a1142464813.tar.bz2
scummvm-rg350-e31a4a409e21c780653d805201149a1142464813.zip
AVALANCHE: Let listSaves return list sorted on slot numbers.
-rw-r--r--engines/avalanche/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/avalanche/detection.cpp b/engines/avalanche/detection.cpp
index 484d148161..1ea72b613a 100644
--- a/engines/avalanche/detection.cpp
+++ b/engines/avalanche/detection.cpp
@@ -110,7 +110,6 @@ SaveStateList AvalancheMetaEngine::listSaves(const char *target) const {
pattern += ".###";
filenames = saveFileMan->listSavefiles(pattern);
- sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) {
@@ -152,6 +151,8 @@ SaveStateList AvalancheMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}