aboutsummaryrefslogtreecommitdiff
path: root/engines/bbvs
diff options
context:
space:
mode:
authorJohannes Schickel2016-02-25 19:55:13 +0100
committerJohannes Schickel2016-02-25 21:39:45 +0100
commit7daa2ab6fd04d8d43a24531e679cc8848d345186 (patch)
tree0d661a3f550de4daffe9d13e10d2ddce3531785b /engines/bbvs
parente31a4a409e21c780653d805201149a1142464813 (diff)
downloadscummvm-rg350-7daa2ab6fd04d8d43a24531e679cc8848d345186.tar.gz
scummvm-rg350-7daa2ab6fd04d8d43a24531e679cc8848d345186.tar.bz2
scummvm-rg350-7daa2ab6fd04d8d43a24531e679cc8848d345186.zip
BBVS: Let listSaves return list sorted on slot numbers.
Diffstat (limited to 'engines/bbvs')
-rw-r--r--engines/bbvs/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/bbvs/detection.cpp b/engines/bbvs/detection.cpp
index eb894e9f13..d2da3861bc 100644
--- a/engines/bbvs/detection.cpp
+++ b/engines/bbvs/detection.cpp
@@ -116,7 +116,6 @@ SaveStateList BbvsMetaEngine::listSaves(const char *target) const {
pattern += ".###";
Common::StringArray filenames;
filenames = saveFileMan->listSavefiles(pattern.c_str());
- Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
@@ -131,6 +130,8 @@ SaveStateList BbvsMetaEngine::listSaves(const char *target) const {
}
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}