SCI: Let listSaves return list sorted on slot numbers.

This commit is contained in:
Johannes Schickel 2016-02-25 19:55:14 +01:00
parent ce8998760d
commit cea96e4a39

View File

@ -727,7 +727,6 @@ SaveStateList SciMetaEngine::listSaves(const char *target) const {
pattern += ".###";
filenames = saveFileMan->listSavefiles(pattern);
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
int slotNr = 0;
@ -760,6 +759,8 @@ SaveStateList SciMetaEngine::listSaves(const char *target) const {
}
}
// Sort saves based on slot number.
Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}