diff options
author | Johannes Schickel | 2016-02-25 19:55:13 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-02-25 21:39:45 +0100 |
commit | e428dfc744e85d132798d09c3dad4b460374ffe4 (patch) | |
tree | c0a6643f1dcb181eb69d55eb395f8f946a086c37 /engines/cge | |
parent | 7daa2ab6fd04d8d43a24531e679cc8848d345186 (diff) | |
download | scummvm-rg350-e428dfc744e85d132798d09c3dad4b460374ffe4.tar.gz scummvm-rg350-e428dfc744e85d132798d09c3dad4b460374ffe4.tar.bz2 scummvm-rg350-e428dfc744e85d132798d09c3dad4b460374ffe4.zip |
CGE: Let listSaves return list sorted on slot numbers.
Diffstat (limited to 'engines/cge')
-rw-r--r-- | engines/cge/detection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp index 47c5f56b6e..95705cbebc 100644 --- a/engines/cge/detection.cpp +++ b/engines/cge/detection.cpp @@ -199,7 +199,6 @@ SaveStateList CGEMetaEngine::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 CGEMetaEngine::listSaves(const char *target) const { } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } |