mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-11-22 05:54:29 +03:00
feat(whoa): implement the ability to shut down the client gracefully, saving CVars upon exit
This commit is contained in:
1 parent
17ccf2a8bb
commit
0105c72da0
11 files changed
+186
-25
No files matched your search
+12
-4
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user