aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:15 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commit2b53a26bb4f609261c0a45a23c7fc65be6063afe (patch)
treeef441b9a682667fb88fe8b56f872d428369792a5 /engines
parent9eed3e15fbb34ab7bb2b4dc905decebddc43e5fd (diff)
downloadscummvm-rg350-2b53a26bb4f609261c0a45a23c7fc65be6063afe.tar.gz
scummvm-rg350-2b53a26bb4f609261c0a45a23c7fc65be6063afe.tar.bz2
scummvm-rg350-2b53a26bb4f609261c0a45a23c7fc65be6063afe.zip
WAGE: Let listSaves return list sorted on slot numbers.
Diffstat (limited to 'engines')
-rw-r--r--engines/wage/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/wage/detection.cpp b/engines/wage/detection.cpp
index c4c1d35eec..91e20f3750 100644
--- a/engines/wage/detection.cpp
+++ b/engines/wage/detection.cpp
@@ -100,7 +100,6 @@ SaveStateList WageMetaEngine::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 file = filenames.begin(); file != filenames.end(); ++file) {
@@ -119,6 +118,8 @@ SaveStateList WageMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}