diff options
author | Johannes Schickel | 2016-02-25 19:55:13 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-02-25 21:39:45 +0100 |
commit | 8fce4b5f19d1fb2eb3075ca0d1f02da0123b5e79 (patch) | |
tree | 956dfa5a792df544aaf84fe4c1f011d8953e2534 /engines/cge2 | |
parent | e428dfc744e85d132798d09c3dad4b460374ffe4 (diff) | |
download | scummvm-rg350-8fce4b5f19d1fb2eb3075ca0d1f02da0123b5e79.tar.gz scummvm-rg350-8fce4b5f19d1fb2eb3075ca0d1f02da0123b5e79.tar.bz2 scummvm-rg350-8fce4b5f19d1fb2eb3075ca0d1f02da0123b5e79.zip |
CGE2: Let listSaves return list sorted on slot numbers.
Diffstat (limited to 'engines/cge2')
-rw-r--r-- | engines/cge2/detection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/cge2/detection.cpp b/engines/cge2/detection.cpp index a1867b0dfe..3ccfffe43f 100644 --- a/engines/cge2/detection.cpp +++ b/engines/cge2/detection.cpp @@ -199,7 +199,6 @@ SaveStateList CGE2MetaEngine::listSaves(const char *target) const { pattern += ".###"; filenames = saveFileMan->listSavefiles(pattern); - sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) SaveStateList saveList; for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) { @@ -235,6 +234,8 @@ SaveStateList CGE2MetaEngine::listSaves(const char *target) const { } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } |