aboutsummaryrefslogtreecommitdiff
path: root/engines/sky
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:14 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commit265ed503c1f0de9adecd4c84577f4c8f63670ab8 (patch)
treecc8d64d59c15abcf9c1a0d0cf9dd2620c22fcdce /engines/sky
parentd1cf867fc4fbf12e00dbf0ed2c4a6288cf28703b (diff)
downloadscummvm-rg350-265ed503c1f0de9adecd4c84577f4c8f63670ab8.tar.gz
scummvm-rg350-265ed503c1f0de9adecd4c84577f4c8f63670ab8.tar.bz2
scummvm-rg350-265ed503c1f0de9adecd4c84577f4c8f63670ab8.zip
SKY: Let listSaves return list sorted on slot numbers.
Diffstat (limited to 'engines/sky')
-rw-r--r--engines/sky/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index 8a8967629d..d85299cc24 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -223,7 +223,6 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const {
// Find all saves
Common::StringArray filenames;
filenames = saveFileMan->listSavefiles("SKY-VM.###");
- sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
// Slot 0 is the autosave, if it exists.
// TODO: Check for the existence of the autosave -- but this require us
@@ -243,6 +242,8 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}