Browse Source

Add Sys_Warn

pull/2/head
Alibek Omarov 7 years ago
parent
commit
7ace83eeab
  1. 22
      engine/common/sys_win.c
  2. 1
      engine/common/system.h

22
engine/common/sys_win.c

@ -432,6 +432,28 @@ long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo ) @@ -432,6 +432,28 @@ long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo )
return EXCEPTION_CONTINUE_EXECUTION;
}
/*
================
Sys_Warn
Just messagebox
================
*/
void Sys_Warn( const char *format, ... )
{
va_list argptr;
char text[MAX_SYSPATH];
DEBUG_BREAK;
va_start( argptr, format );
Q_vsnprintf( text, MAX_SYSPATH, format, argptr );
va_end( argptr );
Msg( "Sys_Warn: %s\n", text );
if( !Host_IsDedicated() ) // dedicated server should not hang on messagebox
MSGBOX(text);
}
/*
================
Sys_Error

1
engine/common/system.h

@ -81,6 +81,7 @@ double Sys_DoubleTime( void ); @@ -81,6 +81,7 @@ double Sys_DoubleTime( void );
char *Sys_GetClipboardData( void );
char *Sys_GetCurrentUser( void );
int Sys_CheckParm( const char *parm );
void Sys_Warn( const char *format, ... );
void Sys_Error( const char *error, ... );
qboolean Sys_LoadLibrary( dll_info_t *dll );
void* Sys_GetProcAddress( dll_info_t *dll, const char* name );

Loading…
Cancel
Save