/* ============= 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); }
void Sys_Quit (void) { IN_Shutdown(); Com_ShutdownZoneMemory(); Com_ShutdownHunkMemory(); Sys_Exit(0); }
/* ============== Sys_Quit ============== */ void Sys_Quit( void ) { timeEndPeriod( 1 ); IN_Shutdown(); Sys_DestroyConsole(); Com_ShutdownZoneMemory(); Com_ShutdownHunkMemory(); exit (0); }
static void NORETURN Sys_Exit( int ex ) { IN_Shutdown(); #ifndef DEDICATED SDL_Quit(); #endif NET_Shutdown(); Sys_PlatformExit(); Com_ShutdownHunkMemory(); Com_ShutdownZoneMemory(); CON_Shutdown(); exit( ex ); }
/* ============= Sys_Error Show the early console as an error dialog ============= */ void Sys_Error( const char *error, ... ) { va_list argptr; char text[256]; va_start (argptr, error); Q_vsnprintf (text, sizeof(text), error, argptr); va_end (argptr); #ifdef _GAMECUBE printf(text); #else OutputDebugString(text); #endif #if 0 // UN-PORT Com_ShutdownZoneMemory(); Com_ShutdownHunkMemory(); #endif exit (1); }