Skip to content

Commit

Permalink
ACCESS: Let listSaves return list sorted on slot numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schickel committed Feb 25, 2016
1 parent a155220 commit cf685fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engines/access/detection.cpp
Expand Up @@ -146,7 +146,6 @@ SaveStateList AccessMetaEngine::listSaves(const char *target) const {
Access::AccessSavegameHeader header;

filenames = saveFileMan->listSavefiles(pattern);
sort(filenames.begin(), filenames.end()); // Sort to get the files in numerical order

SaveStateList saveList;
for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
Expand All @@ -167,6 +166,8 @@ SaveStateList AccessMetaEngine::listSaves(const char *target) const {
}
}

// Sort saves based on slot number.
Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}

Expand Down

0 comments on commit cf685fb

Please sign in to comment.