aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:14 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commitc31fdb1efcf76c3862dc93aa1ff7e3ea52df6e76 (patch)
tree28eed84dbaa4db5278809b9cbc29b5ac611d7704 /engines/lab
parent56fc42c2f7102ed9b2002a10a1b6a7ff8a28fbfd (diff)
downloadscummvm-rg350-c31fdb1efcf76c3862dc93aa1ff7e3ea52df6e76.tar.gz
scummvm-rg350-c31fdb1efcf76c3862dc93aa1ff7e3ea52df6e76.tar.bz2
scummvm-rg350-c31fdb1efcf76c3862dc93aa1ff7e3ea52df6e76.zip
LAB: Let listSaves return list sorted on slot numbers.
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/lab/detection.cpp b/engines/lab/detection.cpp
index d01dff2843..b080a80f68 100644
--- a/engines/lab/detection.cpp
+++ b/engines/lab/detection.cpp
@@ -169,7 +169,6 @@ SaveStateList LabMetaEngine::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;
@@ -187,6 +186,8 @@ SaveStateList LabMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}