Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/main.cpp
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | |||||
#include "simulation2/Simulation2.h" | #include "simulation2/Simulation2.h" | ||||
#include "simulation2/system/TurnManager.h" | #include "simulation2/system/TurnManager.h" | ||||
#include "soundmanager/ISoundManager.h" | #include "soundmanager/ISoundManager.h" | ||||
#if OS_UNIX | #if OS_UNIX | ||||
#include <unistd.h> // geteuid | #include <unistd.h> // geteuid | ||||
#endif // OS_UNIX | #endif // OS_UNIX | ||||
#if OS_MACOSX | |||||
#include "lib/sysdep/os/osx/osx_atlas.h" | |||||
#endif | |||||
#if MSC_VERSION | #if MSC_VERSION | ||||
#include <process.h> | #include <process.h> | ||||
#define getpid _getpid // Use the non-deprecated function name | #define getpid _getpid // Use the non-deprecated function name | ||||
#endif | #endif | ||||
extern CmdLineArgs g_args; | extern CmdLineArgs g_args; | ||||
extern CStrW g_UniqueLogPostfix; | extern CStrW g_UniqueLogPostfix; | ||||
▲ Show 20 Lines • Show All 617 Lines • ▼ Show 20 Lines | do | ||||
modsToInstall.clear(); | modsToInstall.clear(); | ||||
Shutdown(0); | Shutdown(0); | ||||
MainControllerShutdown(); | MainControllerShutdown(); | ||||
flags &= ~INIT_MODS; | flags &= ~INIT_MODS; | ||||
} while (g_Shutdown == ShutdownType::Restart); | } while (g_Shutdown == ShutdownType::Restart); | ||||
#if OS_MACOSX | |||||
if (g_Shutdown == ShutdownType::RestartAsAtlas) | |||||
startNewAtlasProcess(); | |||||
#else | |||||
if (g_Shutdown == ShutdownType::RestartAsAtlas) | if (g_Shutdown == ShutdownType::RestartAsAtlas) | ||||
ATLAS_RunIfOnCmdLine(args, true); | ATLAS_RunIfOnCmdLine(args, true); | ||||
#endif | |||||
CXeromyces::Terminate(); | CXeromyces::Terminate(); | ||||
} | } | ||||
#if OS_ANDROID | #if OS_ANDROID | ||||
// In Android we compile the engine as a shared library, not an executable, | // In Android we compile the engine as a shared library, not an executable, | ||||
// so rename main() to a different symbol that the wrapper library can load | // so rename main() to a different symbol that the wrapper library can load | ||||
#undef main | #undef main | ||||
Show All 31 Lines |
Wildfire Games · Phabricator