aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:15 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commit9eed3e15fbb34ab7bb2b4dc905decebddc43e5fd (patch)
tree344cc7b758e5da61a060630f233a519606223b9d /engines/voyeur
parent0aea4b59df9fadf8d4a91f982c7b38f47d8cd6e2 (diff)
downloadscummvm-rg350-9eed3e15fbb34ab7bb2b4dc905decebddc43e5fd.tar.gz
scummvm-rg350-9eed3e15fbb34ab7bb2b4dc905decebddc43e5fd.tar.bz2
scummvm-rg350-9eed3e15fbb34ab7bb2b4dc905decebddc43e5fd.zip
VOYEUR: Let listSaves return list sorted on slot numbers.
Diffstat (limited to 'engines/voyeur')
-rw-r--r--engines/voyeur/detection.cpp3
1 files changed, 2 insertions, 1 deletions
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;
}