Strip path from save file name

svn-id: r28410
This commit is contained in:
Sven Hesse 2007-08-02 16:19:47 +00:00
parent 1c26274061
commit b9092cc18d
2 changed files with 8 additions and 0 deletions

View File

@ -47,6 +47,10 @@ SaveLoad_v2::SaveLoad_v2(GobEngine *vm, const char *targetName) :
}
SaveType SaveLoad_v2::getSaveType(const char *fileName) {
const char *backSlash;
if ((backSlash = strrchr(fileName, '\\')))
fileName = backSlash + 1;
if (!scumm_stricmp(fileName, "cat.inf"))
return kSaveGame;
if (!scumm_stricmp(fileName, "cat.cat"))

View File

@ -58,6 +58,10 @@ SaveLoad_v3::SaveLoad_v3(GobEngine *vm, const char *targetName) :
}
SaveType SaveLoad_v3::getSaveType(const char *fileName) {
const char *backSlash;
if ((backSlash = strrchr(fileName, '\\')))
fileName = backSlash + 1;
if (!scumm_stricmp(fileName, "cat.inf"))
return kSaveGame;
if (!scumm_stricmp(fileName, "ima.inf"))