From 153b04abc3a8b740532e20c2d3057e62afd2868b Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 2 Oct 2025 05:40:58 +0800 Subject: [PATCH] engine: move crash handler initialization after console, so error messages could be seen in console, but move log creation before console, so log catches more messages --- engine/common/host.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/engine/common/host.c b/engine/common/host.c index ea7cd4db..2ead6ca0 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -1027,9 +1027,6 @@ static void Host_InitCommon( int argc, char **argv, const char *progname, qboole Sys_PrintBugcompUsage( exename ); } - if( !Sys_CheckParm( "-noch" )) - Sys_SetupCrashHandler( argv[0] ); - host.change_game = bChangeGame || Sys_CheckParm( "-changegame" ); host.config_executed = false; host.status = HOST_INIT; // initialzation started @@ -1101,8 +1098,12 @@ static void Host_InitCommon( int argc, char **argv, const char *progname, qboole Cvar_SetValue( "sys_ticrate", fps ); } + Sys_InitLog(); Con_Init(); // early console running to catch all the messages + if( !Sys_CheckParm( "-noch" )) + Sys_SetupCrashHandler( argv[0] ); + #if XASH_ENGINE_TESTS if( Sys_CheckParm( "-runtests" )) Host_RunTests( 0 ); @@ -1114,8 +1115,6 @@ static void Host_InitCommon( int argc, char **argv, const char *progname, qboole Platform_Init( Host_IsDedicated( ) || developer >= DEV_EXTENDED, basedir ); FS_Init( basedir ); - Sys_InitLog(); - // print current developer level to simplify processing users feedback if( developer > 0 ) {