aboutsummaryrefslogtreecommitdiff
path: root/engines/pegasus/detection.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2013-02-04 12:34:06 -0500
committerMatthew Hoops2013-02-04 12:34:06 -0500
commit49ebbfd9dca6630ad38629bbb3a736d18d63a471 (patch)
tree8503ca603e4980be07a7c8a7089d0774f31214ae /engines/pegasus/detection.cpp
parent84bea855b4e0ead3ae680f35bb10885c6b70206e (diff)
downloadscummvm-rg350-49ebbfd9dca6630ad38629bbb3a736d18d63a471.tar.gz
scummvm-rg350-49ebbfd9dca6630ad38629bbb3a736d18d63a471.tar.bz2
scummvm-rg350-49ebbfd9dca6630ad38629bbb3a736d18d63a471.zip
PEGASUS: Sort save file names alphabetically
Diffstat (limited to 'engines/pegasus/detection.cpp')
-rw-r--r--engines/pegasus/detection.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/pegasus/detection.cpp b/engines/pegasus/detection.cpp
index 908005b665..ba631148d5 100644
--- a/engines/pegasus/detection.cpp
+++ b/engines/pegasus/detection.cpp
@@ -119,12 +119,12 @@ SaveStateList PegasusMetaEngine::listSaves(const char *target) const {
// The original had no pattern, so the user must rename theirs
// Note that we ignore the target because saves are compatible between
// all versions
- Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles("pegasus-*.sav");
+ Common::StringArray fileNames = Pegasus::PegasusEngine::listSaveFiles();
SaveStateList saveList;
- for (uint32 i = 0; i < filenames.size(); i++) {
+ for (uint32 i = 0; i < fileNames.size(); i++) {
// Isolate the description from the file name
- Common::String desc = filenames[i].c_str() + 8;
+ Common::String desc = fileNames[i].c_str() + 8;
for (int j = 0; j < 4; j++)
desc.deleteLastChar();
@@ -136,8 +136,8 @@ SaveStateList PegasusMetaEngine::listSaves(const char *target) const {
void PegasusMetaEngine::removeSaveState(const char *target, int slot) const {
// See listSaves() for info on the pattern
- Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles("pegasus-*.sav");
- g_system->getSavefileManager()->removeSavefile(filenames[slot].c_str());
+ Common::StringArray fileNames = Pegasus::PegasusEngine::listSaveFiles();
+ g_system->getSavefileManager()->removeSavefile(fileNames[slot].c_str());
}
bool PegasusMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {