summaryrefslogtreecommitdiff
path: root/fileio.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2004-12-07 17:16:57 +0000
committerbjarni <bjarni@openttd.org>2004-12-07 17:16:57 +0000
commit051134ac9f88ec88bfd7bbd1bc209ccd42dffbcc (patch)
tree44291cabe320182bb12c67a353076ac2f256f475 /fileio.c
parenta3a2f0617c0eebe63980b2057214fb4e9f76c41d (diff)
downloadopenttd-051134ac9f88ec88bfd7bbd1bc209ccd42dffbcc.tar.xz
(svn r970) Added 2nd data path for all non-windows OSes
added completely customizable lang path (all non-Windows OSes)
Diffstat (limited to 'fileio.c')
-rw-r--r--fileio.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fileio.c b/fileio.c
index 490cdc1ba..5645d338f 100644
--- a/fileio.c
+++ b/fileio.c
@@ -110,6 +110,16 @@ void FioOpenFile(int slot, const char *filename)
for(s=buf + strlen(_path.data_dir) - 1; *s != 0; s++)
*s = tolower(*s);
f = fopen(buf, "rb");
+
+#if defined SECOND_DATA_DIR
+ // tries in the 2nd data directory
+ if (f == NULL) {
+ sprintf(buf, "%s%s", _path.second_data_dir, filename);
+ for(s=buf + strlen(_path.second_data_dir) - 1; *s != 0; s++)
+ *s = tolower(*s);
+ f = fopen(buf, "rb");
+ }
+#endif
}
#endif