MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / exitCleanly

Function exitCleanly

src/OpenLoco/src/OpenLoco.cpp:119–140  ·  view source on GitHub ↗

0x004BE65E

Source from the content-addressed store, hash-verified

117
118 // 0x004BE65E
119 [[noreturn]] void exitCleanly()
120 {
121 Audio::close();
122 Audio::disposeDSound();
123 Ui::disposeCursors();
124 Localisation::unloadLanguageFile();
125
126 auto tempFilePath = Environment::getPathNoWarning(Environment::PathId::_1tmp);
127 if (fs::exists(tempFilePath))
128 {
129 auto path8 = tempFilePath.u8string();
130 Logging::info("Removing temp file '{}'", path8.c_str());
131 fs::remove(tempFilePath);
132 }
133 CrashHandler::shutdown(_exHandler);
134
135 // Logging should be the last before terminating.
136 Logging::shutdown();
137
138 // SDL_Quit();
139 exit(0);
140 }
141
142 // 0x00441400
143 static void startupChecks()

Callers 3

quitGameFunction · 0.85
exitWithErrorFunction · 0.85
mainFunction · 0.85

Calls 8

disposeDSoundFunction · 0.85
disposeCursorsFunction · 0.85
unloadLanguageFileFunction · 0.85
getPathNoWarningFunction · 0.85
infoFunction · 0.85
removeFunction · 0.70
shutdownFunction · 0.70
closeFunction · 0.50

Tested by

no test coverage detected