diff options
author | Darkvater <darkvater@openttd.org> | 2006-08-05 00:47:32 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-08-05 00:47:32 +0000 |
commit | 525a0ad4c033b378511a3bfc8da79b67a94c2497 (patch) | |
tree | 9c2671f2ef8e6b0e0d6858655cc2c0f754e32de6 /oldloader.c | |
parent | ee7b3de2f58c22d5667724471a366c23764de46d (diff) | |
download | openttd-525a0ad4c033b378511a3bfc8da79b67a94c2497.tar.xz |
(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.
Diffstat (limited to 'oldloader.c')
-rw-r--r-- | oldloader.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/oldloader.c b/oldloader.c index cd01c356a..439801d8d 100644 --- a/oldloader.c +++ b/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); -} |