From 99c59cdeb28ac7e6d80a9343c3b2ca5af9b46b66 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 25 Feb 2016 19:17:49 +0100 Subject: AGOS: Let listSaves return list sorted on slot numbers. --- engines/agos/detection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp index 94446159b9..82f8ad4bf2 100644 --- a/engines/agos/detection.cpp +++ b/engines/agos/detection.cpp @@ -186,7 +186,6 @@ SaveStateList AgosMetaEngine::listSaves(const char *target) const { pattern += ".###"; filenames = saveFileMan->listSavefiles(pattern); - 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) { @@ -203,6 +202,8 @@ SaveStateList AgosMetaEngine::listSaves(const char *target) const { } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } -- cgit v1.2.3