aboutsummaryrefslogtreecommitdiff
path: root/engines/toltecs
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:14 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commitde609c0a925e7ffb388ef66ecf9e70926c9b9c2c (patch)
treec16588b935c5d4ec9ba7fc40eefb904dae034ecd /engines/toltecs
parentcae26227a0a7a417f8183edb58e2cbd78b983f8d (diff)
downloadscummvm-rg350-de609c0a925e7ffb388ef66ecf9e70926c9b9c2c.tar.gz
scummvm-rg350-de609c0a925e7ffb388ef66ecf9e70926c9b9c2c.tar.bz2
scummvm-rg350-de609c0a925e7ffb388ef66ecf9e70926c9b9c2c.zip
TOLTECS: Let listSaves return list sorted on slot numbers.
Diffstat (limited to 'engines/toltecs')
-rw-r--r--engines/toltecs/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/toltecs/detection.cpp b/engines/toltecs/detection.cpp
index fb7d8121ff..145d9544f2 100644
--- a/engines/toltecs/detection.cpp
+++ b/engines/toltecs/detection.cpp
@@ -266,7 +266,6 @@ SaveStateList ToltecsMetaEngine::listSaves(const char *target) const {
Common::StringArray filenames;
filenames = saveFileMan->listSavefiles(pattern.c_str());
- Common::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) {
@@ -284,6 +283,8 @@ SaveStateList ToltecsMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}