From c31fdb1efcf76c3862dc93aa1ff7e3ea52df6e76 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 25 Feb 2016 19:55:14 +0100 Subject: LAB: Let listSaves return list sorted on slot numbers. --- engines/lab/detection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/lab') diff --git a/engines/lab/detection.cpp b/engines/lab/detection.cpp index d01dff2843..b080a80f68 100644 --- a/engines/lab/detection.cpp +++ b/engines/lab/detection.cpp @@ -169,7 +169,6 @@ SaveStateList LabMetaEngine::listSaves(const char *target) const { Common::StringArray filenames; filenames = saveFileMan->listSavefiles(pattern.c_str()); - Common::sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)*/ SaveStateList saveList; @@ -187,6 +186,8 @@ SaveStateList LabMetaEngine::listSaves(const char *target) const { } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } -- cgit v1.2.3