mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 19:22:30 +00:00
feat(whoa): implement the ability to shut down the client gracefully, saving CVars upon exit
This commit is contained in:
parent
17ccf2a8bb
commit
0105c72da0
11 changed files with 186 additions and 25 deletions
|
|
@ -97,8 +97,6 @@ void ClientRegisterConsoleCommands() {
|
|||
ConsoleCommandRegister("reloadUI", CCommand_ReloadUI, GRAPHICS, nullptr);
|
||||
ConsoleCommandRegister("perf", CCommand_Perf, DEBUG, nullptr);
|
||||
|
||||
const auto game = CATEGORY::GAME;
|
||||
|
||||
Client::g_accountNameVar = CVar::Register(
|
||||
"accountName",
|
||||
"Saved account name",
|
||||
|
|
@ -180,7 +178,6 @@ void ClientPostClose(int32_t a1) {
|
|||
|
||||
int32_t DestroyEngineCallback(const void* a1, void* a2) {
|
||||
// TODO
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -625,6 +622,17 @@ int32_t InitializeGlobal() {
|
|||
return 1;
|
||||
}
|
||||
|
||||
void DestroyGlobal() {
|
||||
// TODO
|
||||
|
||||
OsTimeShutdown();
|
||||
EventDestroy();
|
||||
ConsoleDeviceDestroy();
|
||||
CVar::Destroy();
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
void CommonMain() {
|
||||
StormInitialize();
|
||||
|
||||
|
|
@ -659,7 +667,7 @@ void CommonMain() {
|
|||
|
||||
if (InitializeGlobal()) {
|
||||
EventDoMessageLoop();
|
||||
// TODO: DestroyGlobal();
|
||||
DestroyGlobal();
|
||||
}
|
||||
|
||||
// TODO:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue