/* ============= Sys_Error Show the early console as an error dialog ============= */ void QDECL Sys_Error( const char *error, ... ) { va_list argptr; char text[4096]; MSG msg; va_start (argptr, error); vsprintf (text, error, argptr); va_end (argptr); Conbuf_AppendText( text ); Conbuf_AppendText( "\n" ); Sys_SetErrorText( text ); Sys_ShowConsole( 1, qtrue ); timeEndPeriod( 1 ); IN_Shutdown(); // wait for the user to quit while ( 1 ) { if (!GetMessage (&msg, NULL, 0, 0)) Com_Quit_f (); TranslateMessage (&msg); DispatchMessage (&msg); } Sys_DestroyConsole(); Com_ShutdownZoneMemory(); Com_ShutdownHunkMemory(); exit (1); }
/* ============= Sys_Error Show the early console as an error dialog ============= */ void Sys_Error( const char *error, ... ) { va_list argptr; char text[4096]; MSG msg; va_start( argptr, error ); vsprintf( text, error, argptr ); va_end( argptr); Conbuf_AppendText( text ); Conbuf_AppendText( "\n" ); Win_SetErrorText( text ); Sys_ShowConsole( 1, true ); timeEndPeriod( 1 ); Sys_ShutdownInput(); GLimp_Shutdown(); // wait for the user to quit while ( 1 ) { if ( !GetMessage( &msg, NULL, 0, 0 ) ) { common->Quit(); } TranslateMessage( &msg ); DispatchMessage( &msg ); } Sys_DestroyConsole(); exit (1); }
/* ================= Sys_Print ================= */ void Sys_Print( const char *msg ) { #if defined (_WIN32) && !defined (_DEBUG) Conbuf_AppendText( msg ); #else CON_LogWrite( msg ); CON_Print( msg ); #endif }
/* ================= Sys_Error ================= */ void Sys_Error( const char *error, ... ) { va_list argptr; char string[4096]; #if defined (_WIN32) && !defined (_DEBUG) MSG msg; #endif va_start (argptr,error); idStr::vsnPrintf (string, sizeof(string), error, argptr); va_end (argptr); #if defined (_WIN32) && !defined (_DEBUG) Conbuf_AppendText( string ); Conbuf_AppendText( "\n" ); #else // Print text in the console window/box Sys_Print( string ); Sys_Print( "\n" ); #endif #if defined (_WIN32) && !defined (_DEBUG) Sys_SetErrorText( string ); Sys_ShowConsole( 1, qtrue ); timeEndPeriod( 1 ); IN_Shutdown(); // wait for the user to quit while ( 1 ) { if ( !GetMessage( &msg, NULL, 0, 0 ) ) { Com_Quit_f(); } TranslateMessage( &msg ); DispatchMessage( &msg ); } Sys_DestroyConsole(); #endif CL_Shutdown( ); Sys_ErrorDialog( string ); Sys_Exit( 1 ); }
void Sys_Error (const char *error, ...) { va_list argptr; char text[1024]; va_start (argptr, error); vsnprintf (text, sizeof(text), error, argptr); va_end (argptr); timeEndPeriod( 1 ); CL_Shutdown (); Qcommon_Shutdown (); if (qDedConsole) { MSG msg; BOOL bRet; Conbuf_AppendText( text ); Conbuf_AppendText( "\n" ); Sys_SetErrorText( text ); Sys_ShowConsole( 1, true ); // wait for the user to quit while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0) { if (bRet == -1) break; TranslateMessage (&msg); DispatchMessage (&msg); Sleep(25); } } else { MessageBox(NULL, text, "Error", 0 /* MB_OK */ ); } Sys_DestroyConsole(); exit (1); }
/* ================= Sys_Print ================= */ void Sys_Print(const char *msg) { #if defined (USE_WINDOWS_CONSOLE) Conbuf_AppendText(msg); #else CON_LogWrite(msg); CON_Print(msg); #endif }
/* ================= Sys_Error ================= */ void Sys_Error(const char *error, ...) { va_list argptr; char string[1024]; #ifdef USE_WINDOWS_CONSOLE MSG msg; #endif va_start(argptr, error); Q_vsnprintf(string, sizeof(string), error, argptr); va_end(argptr); #ifdef _WIN32 Sys_Splash(qfalse); #endif #ifdef USE_WINDOWS_CONSOLE Conbuf_AppendText(string); Conbuf_AppendText("\n"); Sys_SetErrorText(string); Sys_ShowConsoleWindow(1, qtrue); IN_Shutdown(); // wait for the user to quit while (1) { if (!GetMessage(&msg, NULL, 0, 0)) { Com_Quit_f(); } TranslateMessage(&msg); DispatchMessage(&msg); } Sys_DestroyConsole(); #endif Sys_ErrorDialog(string); Sys_Exit(3); }
void Sys_Print( const char *msg ) { // TTimo - prefix for text that shows up in console but not in notify // backported from RTCW if ( !Q_strncmp( msg, "[skipnotify]", 12 ) ) { msg += 12; } if ( msg[0] == '*' ) { msg += 1; } Conbuf_AppendText( msg ); }
/* ================= Sys_Print ================= */ void Sys_Print(const char *msg) { #ifdef USE_WINDOWS_CONSOLE Conbuf_AppendText(msg); #else CON_LogWrite(msg); CON_Print(msg); #endif #if defined(LEGACY_DEBUG) && defined(_WIN32) OutputDebugString(msg); #endif }
void Sys_Printf( const char *fmt, ... ) { char msg[MAXPRINTMSG]; va_list argptr; va_start(argptr, fmt); idStr::vsnPrintf( msg, MAXPRINTMSG-1, fmt, argptr ); va_end(argptr); msg[sizeof(msg)-1] = '\0'; OutputDebugString( msg ); if ( win32.win_outputEditString.GetBool() && idLib::IsMainThread() ) { Conbuf_AppendText( msg ); } }
/* ============== Sys_Print ============== */ void Sys_Print( const char *msg ) { Conbuf_AppendText( msg ); }
/* ================ Sys_ConsoleOutput Print text to the dedicated console ================ */ void Sys_ConsoleOutput (const char *string) { if (qDedConsole) Conbuf_AppendText( string ); }