aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tony/detection.cpp')
-rw-r--r--engines/tony/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/tony/detection.cpp b/engines/tony/detection.cpp
index 2f05c0abea..ec0b3e186b 100644
--- a/engines/tony/detection.cpp
+++ b/engines/tony/detection.cpp
@@ -118,7 +118,6 @@ SaveStateList TonyMetaEngine::listSaves(const char *target) const {
Common::String pattern = "tony.0##";
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) {
@@ -137,6 +136,8 @@ SaveStateList TonyMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}