DREAMWEB: Let listSaves return list sorted on slot numbers.
This commit is contained in:
parent
c5c1209edd
commit
3def363968
1 changed files with 2 additions and 1 deletions
|
@ -128,7 +128,6 @@ bool DreamWebMetaEngine::createInstance(OSystem *syst, Engine **engine, const AD
|
|||
SaveStateList DreamWebMetaEngine::listSaves(const char *target) const {
|
||||
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
|
||||
Common::StringArray files = saveFileMan->listSavefiles("DREAMWEB.D##");
|
||||
Common::sort(files.begin(), files.end());
|
||||
|
||||
SaveStateList saveList;
|
||||
for (uint i = 0; i < files.size(); ++i) {
|
||||
|
@ -146,6 +145,8 @@ SaveStateList DreamWebMetaEngine::listSaves(const char *target) const {
|
|||
saveList.push_back(sd);
|
||||
}
|
||||
|
||||
// Sort saves based on slot number.
|
||||
Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
|
||||
return saveList;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue