summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-17 10:17:18 +0000
committertron <tron@openttd.org>2005-01-17 10:17:18 +0000
commit1847b994612ea04967540ad227d173b827ca6301 (patch)
tree08e7813f24ffc4ca00b57eb5879f75b62cb36f99
parent5adad6c1b4766fbb28b7c6fbea846a49d3bf6732 (diff)
downloadopenttd-1847b994612ea04967540ad227d173b827ca6301.tar.xz
(svn r1551) Silence a warning and simplify a preprocessor check
-rw-r--r--unix.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/unix.c b/unix.c
index 825e6f3c1..f47ed6c26 100644
--- a/unix.c
+++ b/unix.c
@@ -408,6 +408,7 @@ int GetLanguageList(char **languages, int max)
return num;
}
+#if defined(__BEOS__) || defined(__linux__)
static void ChangeWorkingDirectory(char *exe)
{
char *s = strrchr(exe, '/');
@@ -417,6 +418,7 @@ static void ChangeWorkingDirectory(char *exe)
*s = '/';
}
}
+#endif
void ShowInfo(const char *str)
{
@@ -439,10 +441,7 @@ void ShowOSErrorBox(const char *buf)
int CDECL main(int argc, char* argv[])
{
// change the working directory to enable doubleclicking in UIs
-#if defined(__BEOS__)
- ChangeWorkingDirectory(argv[0]);
-#endif
-#if defined(__linux__)
+#if defined(__BEOS__) || defined(__linux__)
ChangeWorkingDirectory(argv[0]);
#endif