Changeset View
Changeset View
Standalone View
Standalone View
source/tools/atlas/GameInterface/GameLoop.cpp
Show First 20 Lines • Show All 302 Lines • ▼ Show 20 Lines | bool BeginAtlas(const CmdLineArgs& args, const DllLoader& dll) | ||||
// Tell Atlas the location of the data directory | // Tell Atlas the location of the data directory | ||||
const Paths paths(args); | const Paths paths(args); | ||||
Atlas_SetDataDirectory(paths.RData().string().c_str()); | Atlas_SetDataDirectory(paths.RData().string().c_str()); | ||||
// Tell Atlas the location of the user config directory | // Tell Atlas the location of the user config directory | ||||
Atlas_SetConfigDirectory(paths.Config().string().c_str()); | Atlas_SetConfigDirectory(paths.Config().string().c_str()); | ||||
// SDL must be call in the main thread on osx | |||||
Stan: Must be called [...] On osx :) | |||||
SDL_InitSubSystem(SDL_INIT_VIDEO); | |||||
SDL_GL_LoadLibrary(nullptr); // NULL = use default | |||||
Done Inline ActionsNot sure whether null or nullptr here. Stan: Not sure whether null or nullptr here. | |||||
Done Inline ActionsIf in doubt, check CppSupport and Coding_Conventions :) We support nullptr, so there's no reason to avoid using it in our C++ code, if you want. In fact, it's the recommended convention. historic_bruno: If in doubt, check [[ https://trac.wildfiregames.com/wiki/CppSupport | CppSupport ]] and… | |||||
// Run the engine loop in a new thread | // Run the engine loop in a new thread | ||||
pthread_t engineThread; | pthread_t engineThread; | ||||
pthread_create(&engineThread, NULL, RunEngine, reinterpret_cast<void*>(const_cast<CmdLineArgs*>(&args))); | pthread_create(&engineThread, NULL, RunEngine, reinterpret_cast<void*>(const_cast<CmdLineArgs*>(&args))); | ||||
// Start Atlas UI on main thread | // Start Atlas UI on main thread | ||||
// (required for wxOSX/Cocoa compatibility - see http://trac.wildfiregames.com/ticket/500) | // (required for wxOSX/Cocoa compatibility - see http://trac.wildfiregames.com/ticket/500) | ||||
Atlas_StartWindow(L"ScenarioEditor"); | Atlas_StartWindow(L"ScenarioEditor"); | ||||
Show All 14 Lines |
Wildfire Games · Phabricator
Must be called [...] On osx :)