From 787b0d248098e1b80471e831977c710ace64f379 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 10 Oct 2020 17:28:09 +0300 Subject: [PATCH] - setup console handlers earlier to make them available during exit cleanup https://forum.zdoom.org/viewtopic.php?t=70093 --- src/d_main.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index 22c5217ab1..1d4748ae84 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -3146,16 +3146,6 @@ static int D_DoomMain_Internal (void) // reinit from here - ConsoleCallbacks cb = { - D_UserInfoChanged, - D_SendServerInfoChange, - D_SendServerFlagChange, - G_GetUserCVar, - []() { return gamestate != GS_FULLCONSOLE && gamestate != GS_STARTUP; } - }; - - C_InstallHandlers(&cb); - do { PClass::StaticInit(); @@ -3642,6 +3632,17 @@ int GameMain() { int ret = 0; GameTicRate = TICRATE; + + ConsoleCallbacks cb = { + D_UserInfoChanged, + D_SendServerInfoChange, + D_SendServerFlagChange, + G_GetUserCVar, + []() { return gamestate != GS_FULLCONSOLE && gamestate != GS_STARTUP; } + }; + + C_InstallHandlers(&cb); + try { ret = D_DoomMain_Internal();