summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2019-03-10 16:47:34 +0100
committerPatric Stout <truebrain@openttd.org>2019-03-11 10:16:00 +0100
commit45fbaa64c231d6cd2e0831f872dc9df41955eb12 (patch)
tree977f508ea22146b25cd4067b38b32472990988d5
parent1f57150d805059e8985a02725e0a23c37f22098f (diff)
downloadopenttd-45fbaa64c231d6cd2e0831f872dc9df41955eb12.tar.xz
Codechange: check if a define is set directly, instead of indirectly
config.lib happens to set GLOBAL_DATA_DIR in case it is not DOS and not OS2, but this kind of deduction is annoying to maintain. It is better to just check if the define you want to use is set, and leave it to config.lib to set it or not depending on the OS.
-rw-r--r--src/fileio.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileio.cpp b/src/fileio.cpp
index 6b8173cce..9f0db9e65 100644
--- a/src/fileio.cpp
+++ b/src/fileio.cpp
@@ -1121,7 +1121,7 @@ void DetermineBasePaths(const char *exe)
}
}
-#if defined(DOS) || defined(OS2)
+#if !defined(GLOBAL_DATA_DIR)
_searchpaths[SP_INSTALLATION_DIR] = NULL;
#else
seprintf(tmp, lastof(tmp), "%s", GLOBAL_DATA_DIR);