engine: remove MSGBOX macro

This commit is contained in:
Alibek Omarov 2023-12-15 06:39:26 +03:00
parent 521bc675a2
commit 54a5947a3c
4 changed files with 4 additions and 7 deletions

View file

@ -490,7 +490,7 @@ static void Sys_Crash( int signal, siginfo_t *si, void *context)
#ifdef XASH_SDL #ifdef XASH_SDL
SDL_SetWindowGrab( host.hWnd, SDL_FALSE ); SDL_SetWindowGrab( host.hWnd, SDL_FALSE );
#endif #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 // log saved, now we can try to save configs and close log correctly, it may crash
if( host.type == HOST_NORMAL ) if( host.type == HOST_NORMAL )

View file

@ -795,7 +795,7 @@ void GAME_EXPORT Host_Error( const char *error, ... )
Key_SetKeyDest( key_console ); Key_SetKeyDest( key_console );
Con_Printf( "Host_Error: %s", hosterror1 ); 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 // host is shutting down. don't invoke infinite loop

View file

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

View file

@ -30,9 +30,6 @@ extern "C" {
#include "crtlib.h" #include "crtlib.h"
#include "platform/platform.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__ ) #define ASSERT( exp ) if(!( exp )) Sys_Error( "assert failed at %s:%i\n", __FILE__, __LINE__ )
/* /*