mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 08:55:45 +00:00
SWORD2: Let listSaves return list sorted on slot numbers.
This commit is contained in:
parent
d740bc4f2e
commit
0b93e1b004
@ -234,7 +234,6 @@ SaveStateList Sword2MetaEngine::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 file = filenames.begin(); file != filenames.end(); ++file) {
|
||||
@ -252,6 +251,8 @@ SaveStateList Sword2MetaEngine::listSaves(const char *target) const {
|
||||
}
|
||||
}
|
||||
|
||||
// Sort saves based on slot number.
|
||||
Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
|
||||
return saveList;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user