LURE: Let listSaves return list sorted on slot numbers.

This commit is contained in:
Johannes Schickel 2016-02-25 19:55:14 +01:00
parent c31fdb1efc
commit 4892a83cf6

View File

@ -245,7 +245,6 @@ SaveStateList LureMetaEngine::listSaves(const char *target) const {
Common::String pattern = "lure.###";
filenames = saveFileMan->listSavefiles(pattern);
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
@ -262,6 +261,8 @@ SaveStateList LureMetaEngine::listSaves(const char *target) const {
}
}
// Sort saves based on slot number.
Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}