aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:13 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commit1e74033618f4581c41ddaff7b2ebcbd00299513d (patch)
treed4b7ef2cd1edc84b57a478ccb4bf41418bf3051e /engines/hugo
parent6452939b189ac6c0e895ba9eee39b0028ffcdcbe (diff)
downloadscummvm-rg350-1e74033618f4581c41ddaff7b2ebcbd00299513d.tar.gz
scummvm-rg350-1e74033618f4581c41ddaff7b2ebcbd00299513d.tar.bz2
scummvm-rg350-1e74033618f4581c41ddaff7b2ebcbd00299513d.zip
HUGO: Let listSaves return list sorted on slot numbers.
Diffstat (limited to 'engines/hugo')
-rw-r--r--engines/hugo/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/hugo/detection.cpp b/engines/hugo/detection.cpp
index a005e649d4..c48a26b405 100644
--- a/engines/hugo/detection.cpp
+++ b/engines/hugo/detection.cpp
@@ -180,7 +180,6 @@ SaveStateList HugoMetaEngine::listSaves(const char *target) const {
pattern += "-##.SAV";
filenames = saveFileMan->listSavefiles(pattern);
- sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
char slot[3];
@@ -217,6 +216,8 @@ SaveStateList HugoMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}