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

This commit is contained in:
Alibek Omarov
2025-10-02 05:40:58 +08:00
parent 25bfbd3a6b
commit 153b04abc3
+4 -5
View File
@@ -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 )
{