Skip to content

Commit

Permalink
HUGO: 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 6452939 commit 1e74033
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engines/hugo/detection.cpp
Expand Up @@ -180,7 +180,6 @@ SaveStateList HugoMetaEngine::listSaves(const char *target) const {
pattern += "-##.SAV";

filenames = saveFileMan->listSavefiles(pattern);
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)

SaveStateList saveList;
char slot[3];
Expand Down Expand Up @@ -217,6 +216,8 @@ SaveStateList HugoMetaEngine::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 1e74033

Please sign in to comment.