Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/GameSetup.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
#include "ps/GameSetup/Config.h" | #include "ps/GameSetup/Config.h" | ||||
#include "ps/GameSetup/CmdLineArgs.h" | #include "ps/GameSetup/CmdLineArgs.h" | ||||
#include "ps/GameSetup/HWDetect.h" | #include "ps/GameSetup/HWDetect.h" | ||||
#include "ps/Globals.h" | #include "ps/Globals.h" | ||||
#include "ps/Hotkey.h" | #include "ps/Hotkey.h" | ||||
#include "ps/Joystick.h" | #include "ps/Joystick.h" | ||||
#include "ps/Loader.h" | #include "ps/Loader.h" | ||||
#include "ps/Mod.h" | #include "ps/Mod.h" | ||||
#include "ps/ModIo.h" | |||||
#include "ps/Profile.h" | #include "ps/Profile.h" | ||||
#include "ps/ProfileViewer.h" | #include "ps/ProfileViewer.h" | ||||
#include "ps/Profiler2.h" | #include "ps/Profiler2.h" | ||||
#include "ps/Pyrogenesis.h" // psSetLogDir | #include "ps/Pyrogenesis.h" // psSetLogDir | ||||
#include "ps/scripting/JSInterface_Console.h" | #include "ps/scripting/JSInterface_Console.h" | ||||
#include "ps/TouchInput.h" | #include "ps/TouchInput.h" | ||||
#include "ps/UserReport.h" | #include "ps/UserReport.h" | ||||
#include "ps/Util.h" | #include "ps/Util.h" | ||||
▲ Show 20 Lines • Show All 627 Lines • ▼ Show 20 Lines | void Shutdown(int flags) | ||||
if ((flags & SHUTDOWN_FROM_CONFIG)) | if ((flags & SHUTDOWN_FROM_CONFIG)) | ||||
goto from_config; | goto from_config; | ||||
EndGame(); | EndGame(); | ||||
SAFE_DELETE(g_XmppClient); | SAFE_DELETE(g_XmppClient); | ||||
SAFE_DELETE(g_ModIo); | |||||
ShutdownPs(); | ShutdownPs(); | ||||
TIMER_BEGIN(L"shutdown TexMan"); | TIMER_BEGIN(L"shutdown TexMan"); | ||||
delete &g_TexMan; | delete &g_TexMan; | ||||
TIMER_END(L"shutdown TexMan"); | TIMER_END(L"shutdown TexMan"); | ||||
// destroy renderer if it was initialised | // destroy renderer if it was initialised | ||||
if (!nonVisual) | if (!nonVisual) | ||||
Show All 15 Lines | void Shutdown(int flags) | ||||
if (!nonVisual) | if (!nonVisual) | ||||
g_VideoMode.Shutdown(); | g_VideoMode.Shutdown(); | ||||
TIMER_BEGIN(L"shutdown UserReporter"); | TIMER_BEGIN(L"shutdown UserReporter"); | ||||
g_UserReporter.Deinitialize(); | g_UserReporter.Deinitialize(); | ||||
TIMER_END(L"shutdown UserReporter"); | TIMER_END(L"shutdown UserReporter"); | ||||
// Cleanup curl now that g_ModIo and g_UserReporter have been shutdown. | |||||
leper: If that comment is talking about something that should have happened at this point it should do… | |||||
curl_global_cleanup(); | |||||
delete &g_L10n; | delete &g_L10n; | ||||
from_config: | from_config: | ||||
TIMER_BEGIN(L"shutdown ConfigDB"); | TIMER_BEGIN(L"shutdown ConfigDB"); | ||||
delete &g_ConfigDB; | delete &g_ConfigDB; | ||||
TIMER_END(L"shutdown ConfigDB"); | TIMER_END(L"shutdown ConfigDB"); | ||||
SAFE_DELETE(g_Console); | SAFE_DELETE(g_Console); | ||||
▲ Show 20 Lines • Show All 215 Lines • ▼ Show 20 Lines | #endif | ||||
// Optionally start profiler HTTP output automatically | // Optionally start profiler HTTP output automatically | ||||
// (By default it's only enabled by a hotkey, for security/performance) | // (By default it's only enabled by a hotkey, for security/performance) | ||||
bool profilerHTTPEnable = false; | bool profilerHTTPEnable = false; | ||||
CFG_GET_VAL("profiler2.autoenable", profilerHTTPEnable); | CFG_GET_VAL("profiler2.autoenable", profilerHTTPEnable); | ||||
if (profilerHTTPEnable) | if (profilerHTTPEnable) | ||||
g_Profiler2.EnableHTTP(); | g_Profiler2.EnableHTTP(); | ||||
// Initialise everything except Win32 sockets (because our networking | |||||
// system already inits those) | |||||
curl_global_init(CURL_GLOBAL_ALL & ~CURL_GLOBAL_WIN32); | |||||
if (!g_Quickstart) | if (!g_Quickstart) | ||||
g_UserReporter.Initialize(); // after config | g_UserReporter.Initialize(); // after config | ||||
PROFILE2_EVENT("Init finished"); | PROFILE2_EVENT("Init finished"); | ||||
return true; | return true; | ||||
} | } | ||||
void InitGraphics(const CmdLineArgs& args, int flags, const std::vector<CStr>& installedMods) | void InitGraphics(const CmdLineArgs& args, int flags, const std::vector<CStr>& installedMods) | ||||
▲ Show 20 Lines • Show All 675 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
If that comment is talking about something that should have happened at this point it should do so explicitly (that is using the proper tenses or grammatical constructs). Else it should just mention after what it should happen.