diff options
author | rubidium <rubidium@openttd.org> | 2011-08-24 13:38:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-08-24 13:38:26 +0000 |
commit | 05300a00b1c82b1c411b38fb024a6decfefce4f8 (patch) | |
tree | f13b4b5eb198dac31d5de390bd0041f0fa8e4746 /src/settingsgen | |
parent | 5f06d5067f861031dedd8de0ce0d21cd6f70a9a7 (diff) | |
download | openttd-05300a00b1c82b1c411b38fb024a6decfefce4f8.tar.xz |
(svn r22824) -Codechange: pass sub directory to ini loading
Diffstat (limited to 'src/settingsgen')
-rw-r--r-- | src/settingsgen/settingsgen.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/settingsgen/settingsgen.cpp b/src/settingsgen/settingsgen.cpp index ad602e360..7dd8aef43 100644 --- a/src/settingsgen/settingsgen.cpp +++ b/src/settingsgen/settingsgen.cpp @@ -173,7 +173,7 @@ struct SettingsIniFile : IniLoadFile { { } - virtual FILE *OpenFile(const char *filename, size_t *size) + virtual FILE *OpenFile(const char *filename, Subdirectory subdir, size_t *size) { /* Open the text file in binary mode to prevent end-of-line translations * done by ftell() and friends, as defined by K&R. */ @@ -203,6 +203,7 @@ static const char *DEFAULTS_GROUP_NAME = "defaults"; ///< Name of the group c /** * Load the INI file. * @param filename Name of the file to load. + * @param subdir The subdirectory to load from. * @return Loaded INI data. */ static IniLoadFile *LoadIniFile(const char *filename) @@ -210,7 +211,7 @@ static IniLoadFile *LoadIniFile(const char *filename) static const char * const seq_groups[] = {PREAMBLE_GROUP_NAME, POSTAMBLE_GROUP_NAME, NULL}; IniLoadFile *ini = new SettingsIniFile(NULL, seq_groups); - ini->LoadFromDisk(filename); + ini->LoadFromDisk(filename, NO_DIRECTORY); return ini; } |