forked from mirror/OpenTTD
(svn r5765) - Codechange: Fully unify the OS-specific FiosGet...List functions into fios.c, as well as FiosGetSavegameList and FiosGetScenarioList functions with the help of some callbacks.
This commit is contained in:
17
oldloader.c
17
oldloader.c
@@ -1571,11 +1571,15 @@ bool LoadOldSaveGame(const char *file)
|
||||
return true;
|
||||
}
|
||||
|
||||
void GetOldSaveGameName(char *title, const char *file)
|
||||
void GetOldSaveGameName(char *title, const char *path, const char *file)
|
||||
{
|
||||
FILE *f = fopen(file, "rb");
|
||||
title[0] = 0;
|
||||
title[48] = 0;
|
||||
char filename[MAX_PATH];
|
||||
FILE *f;
|
||||
|
||||
snprintf(filename, lengthof(filename), "%s" PATHSEP "%s", path, file);
|
||||
f = fopen(filename, "rb");
|
||||
title[0] = '\0';
|
||||
title[48] = '\0';
|
||||
|
||||
if (f == NULL) return;
|
||||
|
||||
@@ -1583,8 +1587,3 @@ void GetOldSaveGameName(char *title, const char *file)
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
void GetOldScenarioGameName(char *title, const char *file)
|
||||
{
|
||||
GetOldSaveGameName(title, file);
|
||||
}
|
||||
|
Reference in New Issue
Block a user