Skip to content

Commit

Permalink
VOYEUR: 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 0aea4b5 commit 9eed3e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engines/voyeur/detection.cpp
Expand Up @@ -117,7 +117,6 @@ SaveStateList VoyeurMetaEngine::listSaves(const char *target) const {
Common::String pattern = Common::String::format("%s.0##", target);

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

SaveStateList saveList;
Voyeur::VoyeurSavegameHeader header;
Expand All @@ -139,6 +138,8 @@ SaveStateList VoyeurMetaEngine::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 9eed3e1

Please sign in to comment.