diff options
author | rubidium <rubidium@openttd.org> | 2010-07-19 17:46:53 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-07-19 17:46:53 +0000 |
commit | 5b1fc7304a87362ae6ccca563f0ec1dc1405f9cc (patch) | |
tree | 05d786629f3b15056fb7340bb3adb319dadee54d /src/openttd.cpp | |
parent | db94e06094b5b8e46de6961ab081e508ee6a8f54 (diff) | |
download | openttd-5b1fc7304a87362ae6ccca563f0ec1dc1405f9cc.tar.xz |
(svn r20194) -Fix: compilation with network disabled failed
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index 67553349a..b15f38aa2 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -85,7 +85,6 @@ void CallWindowTickEvent(); extern void SetDifficultyLevel(int mode, DifficultySettings *gm_opt); extern Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY); extern void ShowOSErrorBox(const char *buf, bool system); -extern bool _dedicated_forks; extern char *_config_file; /** @@ -347,7 +346,9 @@ static void ShutdownGame() _engine_pool.CleanPool(); _company_pool.CleanPool(); +#ifdef ENABLE_NETWORK free(_config_file); +#endif /* Close all and any open filehandles */ FioCloseAll(); @@ -431,12 +432,14 @@ int ttd_main(int argc, char *argv[]) uint16 dedicated_port = 0; char *join_server_password = NULL; char *join_company_password = NULL; + + extern bool _dedicated_forks; + _dedicated_forks = false; #endif /* ENABLE_NETWORK */ _game_mode = GM_MENU; _switch_mode = SM_MENU; _switch_mode_errorstr = INVALID_STRING_ID; - _dedicated_forks = false; _config_file = NULL; /* The last param of the following function means this: @@ -562,7 +565,7 @@ int ttd_main(int argc, char *argv[]) BaseSounds::FindSets(); BaseMusic::FindSets(); -#if defined(UNIX) && !defined(__MORPHOS__) +#if defined(ENABLE_NETWORK) && defined(UNIX) && !defined(__MORPHOS__) /* We must fork here, or we'll end up without some resources we need (like sockets) */ if (_dedicated_forks) DedicatedFork(); #endif |