Browse Source

engine: remove MSGBOX macro

pull/2/head
Alibek Omarov 1 year ago
parent
commit
54a5947a3c
  1. 2
      engine/common/crashhandler.c
  2. 2
      engine/common/host.c
  3. 4
      engine/common/system.c
  4. 3
      engine/common/system.h

2
engine/common/crashhandler.c

@ -490,7 +490,7 @@ static void Sys_Crash( int signal, siginfo_t *si, void *context) @@ -490,7 +490,7 @@ static void Sys_Crash( int signal, siginfo_t *si, void *context)
#ifdef XASH_SDL
SDL_SetWindowGrab( host.hWnd, SDL_FALSE );
#endif
MSGBOX( message );
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 )

2
engine/common/host.c

@ -795,7 +795,7 @@ void GAME_EXPORT Host_Error( const char *error, ... ) @@ -795,7 +795,7 @@ void GAME_EXPORT Host_Error( const char *error, ... )
Key_SetKeyDest( key_console );
Con_Printf( "Host_Error: %s", hosterror1 );
}
else MSGBOX2( hosterror1 );
else Platform_MessageBox( "Host Error", hosterror1, true );
}
// host is shutting down. don't invoke infinite loop

4
engine/common/system.c

@ -402,7 +402,7 @@ void Sys_Warn( const char *format, ... ) @@ -402,7 +402,7 @@ void Sys_Warn( const char *format, ... )
Msg( "Sys_Warn: %s\n", text );
if( !Host_IsDedicated() ) // dedicated server should not hang on messagebox
MSGBOX(text);
Platform_MessageBox( "Xash Warning", text, false );
}
/*
@ -446,8 +446,8 @@ void Sys_Error( const char *error, ... ) @@ -446,8 +446,8 @@ void Sys_Error( const char *error, ... )
#if XASH_WIN32
Wcon_ShowConsole( false );
#endif
MSGBOX( text );
Sys_Print( text );
Platform_MessageBox( "Xash Error", text, false );
}
else
{

3
engine/common/system.h

@ -30,9 +30,6 @@ extern "C" { @@ -30,9 +30,6 @@ extern "C" {
#include "crtlib.h"
#include "platform/platform.h"
#define MSGBOX( x ) Platform_MessageBox( "Xash Error", (x), false )
#define MSGBOX2( x ) Platform_MessageBox( "Host Error", (x), true )
#define MSGBOX3( x ) Platform_MessageBox( "Host Recursive Error", (x), true )
#define ASSERT( exp ) if(!( exp )) Sys_Error( "assert failed at %s:%i\n", __FILE__, __LINE__ )
/*

Loading…
Cancel
Save