From 3def36396898c6a683c91d62bde331afdfa1325b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 25 Feb 2016 19:55:13 +0100 Subject: DREAMWEB: Let listSaves return list sorted on slot numbers. --- engines/dreamweb/detection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/dreamweb/detection.cpp b/engines/dreamweb/detection.cpp index 4fc624c2f3..853047ccc7 100644 --- a/engines/dreamweb/detection.cpp +++ b/engines/dreamweb/detection.cpp @@ -128,7 +128,6 @@ bool DreamWebMetaEngine::createInstance(OSystem *syst, Engine **engine, const AD SaveStateList DreamWebMetaEngine::listSaves(const char *target) const { Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); Common::StringArray files = saveFileMan->listSavefiles("DREAMWEB.D##"); - Common::sort(files.begin(), files.end()); SaveStateList saveList; for (uint i = 0; i < files.size(); ++i) { @@ -146,6 +145,8 @@ SaveStateList DreamWebMetaEngine::listSaves(const char *target) const { saveList.push_back(sd); } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } -- cgit v1.2.3