aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:14 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commitd740bc4f2e6d3ef40b0c66dd998c3a27d4589658 (patch)
tree3e7a6fe470cc4091565c1f7aa30df9d15890585e /engines
parent265ed503c1f0de9adecd4c84577f4c8f63670ab8 (diff)
downloadscummvm-rg350-d740bc4f2e6d3ef40b0c66dd998c3a27d4589658.tar.gz
scummvm-rg350-d740bc4f2e6d3ef40b0c66dd998c3a27d4589658.tar.bz2
scummvm-rg350-d740bc4f2e6d3ef40b0c66dd998c3a27d4589658.zip
SWORD1: Let listSaves return list sorted on slot numbers.
Diffstat (limited to 'engines')
-rw-r--r--engines/sword1/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 99c4bda9e9..3eac95cdf2 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -241,7 +241,6 @@ SaveStateList SwordMetaEngine::listSaves(const char *target) const {
char saveName[40];
Common::StringArray filenames = saveFileMan->listSavefiles("sword1.###");
- sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
int slotNum = 0;
for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
@@ -259,6 +258,8 @@ SaveStateList SwordMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}