summaryrefslogtreecommitdiff
path: root/fileio.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-07-24 20:47:42 +0000
committerbjarni <bjarni@openttd.org>2005-07-24 20:47:42 +0000
commitcb3c325e5f8bcb09f390ef7a1af0ef0442fe9462 (patch)
treea76a3caff196b9a4ee538b858977e8393b1f4d44 /fileio.c
parent238e47cd42c009f2ab1359428788a65a26fafebb (diff)
downloadopenttd-cb3c325e5f8bcb09f390ef7a1af0ef0442fe9462.tar.xz
(svn r2703) - Feature: [OSX] Added a native alert window to show whatever error() needs to print (Tobin made this, while I fixed some issued in it)
- As a bonus, we now have an objective C file (os/macosx/macos.m) to use the functions Apple made to interact with OS stuff
Diffstat (limited to 'fileio.c')
-rw-r--r--fileio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fileio.c b/fileio.c
index a7d141a8b..25bda0b29 100644
--- a/fileio.c
+++ b/fileio.c
@@ -165,6 +165,10 @@ void FioOpenFile(int slot, const char *filename)
*s = tolower(*s);
f = fopen(buf, "rb");
}
+
+ if (f == NULL)
+ sprintf(buf, "%s%s", _path.data_dir, filename); //makes it print the primary datadir path instead of the secundary one
+
#endif
}
#endif