From bed73e6cfad2b16f0813c898778ab990a2157d69 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 25 Feb 2016 19:55:14 +0100 Subject: MADS: Let listSaves return list sorted on slot numbers. --- engines/mads/detection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/mads') diff --git a/engines/mads/detection.cpp b/engines/mads/detection.cpp index 0357bd4bcc..b3ba60b6d0 100644 --- a/engines/mads/detection.cpp +++ b/engines/mads/detection.cpp @@ -192,7 +192,6 @@ SaveStateList MADSMetaEngine::listSaves(const char *target) const { MADS::MADSSavegameHeader header; filenames = saveFileMan->listSavefiles(pattern); - sort(filenames.begin(), filenames.end()); // Sort to get the files in numerical order SaveStateList saveList; for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) { @@ -213,6 +212,8 @@ SaveStateList MADSMetaEngine::listSaves(const char *target) const { } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } -- cgit v1.2.3