Skip to content

Commit

Permalink
TINSEL: Let listSaves return list sorted on slot numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schickel committed Feb 25, 2016
1 parent 525e5ed commit cae2622
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engines/tinsel/detection.cpp
Expand Up @@ -136,7 +136,6 @@ SaveStateList TinselMetaEngine::listSaves(const char *target) const {
Common::String pattern = target;
pattern = pattern + ".###";
Common::StringArray files = g_system->getSavefileManager()->listSavefiles(pattern);
sort(files.begin(), files.end()); // Sort (hopefully ensuring we are sorted numerically..)

SaveStateList saveList;
int slotNum = 0;
Expand All @@ -160,6 +159,8 @@ SaveStateList TinselMetaEngine::listSaves(const char *target) const {
}
}

// Sort saves based on slot number.
Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}

Expand Down

0 comments on commit cae2622

Please sign in to comment.