mirror of https://github.com/OpenTTD/OpenTTD
(svn r1551) Silence a warning and simplify a preprocessor check
parent
5adad6c1b4
commit
1847b99461
7
unix.c
7
unix.c
|
@ -408,6 +408,7 @@ int GetLanguageList(char **languages, int max)
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__BEOS__) || defined(__linux__)
|
||||||
static void ChangeWorkingDirectory(char *exe)
|
static void ChangeWorkingDirectory(char *exe)
|
||||||
{
|
{
|
||||||
char *s = strrchr(exe, '/');
|
char *s = strrchr(exe, '/');
|
||||||
|
@ -417,6 +418,7 @@ static void ChangeWorkingDirectory(char *exe)
|
||||||
*s = '/';
|
*s = '/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void ShowInfo(const char *str)
|
void ShowInfo(const char *str)
|
||||||
{
|
{
|
||||||
|
@ -439,10 +441,7 @@ void ShowOSErrorBox(const char *buf)
|
||||||
int CDECL main(int argc, char* argv[])
|
int CDECL main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
// change the working directory to enable doubleclicking in UIs
|
// change the working directory to enable doubleclicking in UIs
|
||||||
#if defined(__BEOS__)
|
#if defined(__BEOS__) || defined(__linux__)
|
||||||
ChangeWorkingDirectory(argv[0]);
|
|
||||||
#endif
|
|
||||||
#if defined(__linux__)
|
|
||||||
ChangeWorkingDirectory(argv[0]);
|
ChangeWorkingDirectory(argv[0]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue