From 9eed3e15fbb34ab7bb2b4dc905decebddc43e5fd Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 25 Feb 2016 19:55:15 +0100 Subject: VOYEUR: Let listSaves return list sorted on slot numbers. --- engines/voyeur/detection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/voyeur') diff --git a/engines/voyeur/detection.cpp b/engines/voyeur/detection.cpp index 80a23d3c35..9e5320aac8 100644 --- a/engines/voyeur/detection.cpp +++ b/engines/voyeur/detection.cpp @@ -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; @@ -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; } -- cgit v1.2.3