mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: get rid of host.crashed field, as it's a complete duplicate of host.status
This commit is contained in:
@@ -3677,7 +3677,7 @@ void CL_Shutdown( void )
|
||||
{
|
||||
Con_Printf( "%s()\n", __func__ );
|
||||
|
||||
if( !host.crashed && cls.initialized )
|
||||
if( host.status != HOST_CRASHED && cls.initialized )
|
||||
{
|
||||
Host_WriteOpenGLConfig ();
|
||||
Host_WriteVideoConfig ();
|
||||
|
||||
@@ -342,7 +342,6 @@ typedef struct host_parm_s
|
||||
qboolean apply_game_config; // when true apply only to game cvars and ignore all other commands
|
||||
qboolean apply_opengl_config; // when true apply only to opengl cvars and ignore all other commands
|
||||
qboolean config_executed; // a bit who indicated was config.cfg already executed e.g. from valve.rc
|
||||
qboolean crashed; // set to true if crashed
|
||||
#if XASH_DLL_LOADER
|
||||
qboolean enabledll;
|
||||
#endif
|
||||
|
||||
@@ -1355,7 +1355,7 @@ int EXPORT Host_Main( int argc, char **argv, const char *progname, int bChangeGa
|
||||
#endif // XASH_ANDROID
|
||||
|
||||
// main window message loop
|
||||
while( !host.crashed )
|
||||
while( host.status != HOST_CRASHED )
|
||||
{
|
||||
newtime = Sys_DoubleTime ();
|
||||
COM_Frame( newtime - oldtime );
|
||||
|
||||
@@ -74,13 +74,12 @@ void Sys_Crash( int signal, siginfo_t *si, void *context )
|
||||
#if !XASH_DEDICATED
|
||||
IN_SetMouseGrab( false );
|
||||
#endif
|
||||
host.crashed = true;
|
||||
host.status = HOST_CRASHED;
|
||||
Platform_MessageBox( "Xash Error", message, false );
|
||||
|
||||
// log saved, now we can try to save configs and close log correctly, it may crash
|
||||
if( host.type == HOST_NORMAL )
|
||||
CL_Crashed();
|
||||
host.status = HOST_CRASHED;
|
||||
|
||||
Sys_Quit( "crashed" );
|
||||
}
|
||||
|
||||
@@ -167,13 +167,12 @@ void Sys_CrashLibbacktrace( int signal, siginfo_t *si, void *context )
|
||||
#if !XASH_DEDICATED
|
||||
IN_SetMouseGrab( false );
|
||||
#endif
|
||||
host.crashed = true;
|
||||
host.status = HOST_CRASHED;
|
||||
Platform_MessageBox( "Xash Error", message, false );
|
||||
|
||||
// log saved, now we can try to save configs and close log correctly, it may crash
|
||||
if( host.type == HOST_NORMAL )
|
||||
CL_Crashed();
|
||||
host.status = HOST_CRASHED;
|
||||
|
||||
Sys_Quit( "crashed" );
|
||||
}
|
||||
|
||||
@@ -196,13 +196,12 @@ void Sys_Crash( int signal, siginfo_t *si, void *context )
|
||||
#if !XASH_DEDICATED
|
||||
IN_SetMouseGrab( false );
|
||||
#endif
|
||||
host.crashed = true;
|
||||
host.status = HOST_CRASHED;
|
||||
Platform_MessageBox( "Xash Error", message, false );
|
||||
|
||||
// log saved, now we can try to save configs and close log correctly, it may crash
|
||||
if( host.type == HOST_NORMAL )
|
||||
CL_Crashed();
|
||||
host.status = HOST_CRASHED;
|
||||
|
||||
Sys_Quit( "crashed" );
|
||||
}
|
||||
|
||||
@@ -549,7 +549,7 @@ void Platform_RunEvents( void )
|
||||
{
|
||||
SDL_Event event;
|
||||
|
||||
while( !host.crashed && !host.shutdown_issued && SDL_PollEvent( &event ) )
|
||||
while( host.status != HOST_CRASHED && !host.shutdown_issued && SDL_PollEvent( &event ) )
|
||||
SDLash_EventHandler( &event );
|
||||
|
||||
#if XASH_PSVITA
|
||||
|
||||
@@ -270,7 +270,7 @@ static long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo )
|
||||
if( host.status != HOST_CRASHED )
|
||||
{
|
||||
// check to avoid recursive call
|
||||
host.crashed = true;
|
||||
host.status = HOST_CRASHED;
|
||||
|
||||
#if !XASH_DEDICATED
|
||||
IN_SetMouseGrab( false );
|
||||
@@ -302,7 +302,6 @@ static long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo )
|
||||
|
||||
if( host.type == HOST_NORMAL )
|
||||
CL_Crashed(); // tell client about crash
|
||||
else host.status = HOST_CRASHED;
|
||||
|
||||
if( host_developer.value <= 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user