- setup console handlers earlier to make them available during exit cleanup

https://forum.zdoom.org/viewtopic.php?t=70093
This commit is contained in:
alexey.lysiuk 2020-10-10 17:28:09 +03:00
parent 43a3188bdf
commit 787b0d2480

View file

@ -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();