/* =============== Host_Shutdown FIXME: this is a callback from Sys_Quit and Sys_Error. It would be better to run quit through here before the final handoff to the sys code. =============== */ void Host_Shutdown(void) { static qboolean isdown = false; if (isdown) { printf("recursive shutdown\n"); return; } isdown = true; // keep Con_Printf from trying to update the screen scr_disabled_for_loading = true; Host_WriteConfiguration(); CDAudio_Shutdown(); NET_Shutdown(); BGM_Shutdown(); S_Shutdown(); IN_Shutdown(); if (cls.state != ca_dedicated) { VID_Shutdown(); } }
/* ============= 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 CL_Shutdown(void) { static qboolean isdown = false; if (isdown) { printf("recursive shutdown\n"); return; } isdown = true; CL_WriteConfiguration(); Key_WriteConsoleHistory(); #ifdef CDA CDAudio_Shutdown(); #endif #ifdef OGG OGG_Stop(); #endif S_Shutdown(); IN_Shutdown(); VID_Shutdown(); }
/* =============== CL_Shutdown =============== */ void CL_Shutdown( void ) { MsgDev( D_INFO, "CL_Shutdown()\n" ); if( cls.initialized && !host.crashed ) { Host_WriteOpenGLConfig (); Host_WriteVideoConfig (); } IN_TouchShutdown(); CL_CloseDemoHeader(); IN_Shutdown (); Mobile_Destroy(); SCR_Shutdown (); if( cls.initialized ) { CL_UnloadProgs (); cls.initialized = false; } FS_Delete( "demoheader.tmp" ); // remove tmp file SCR_FreeCinematic (); // release AVI's *after* client.dll because custom renderer may use them S_Shutdown (); R_Shutdown (); }
void Host_Shutdown(void) { static bool isdown = false; if (isdown) { printf("recursive shutdown\n"); return; } isdown = true; // keep Con_Printf from trying to update the screen scr_disabled_for_loading = true; Host_WriteConfiguration(); CDAudio_Shutdown(); NET_Shutdown(); S_Shutdown(); IN_Shutdown(); NN_deinit(); TextureManager::clearAllTextures(); Alias::shutdown(); Cmd::shutdown(); CVar::shutdown(); MemoryObj::Flush(MemoryObj::ZONE); if (cls.state != ca_dedicated) { VID_Shutdown(); } if (con_debuglog) { Con_CloseDebugLog(); } }
void PicturePause (void) { id0_int_t y; id0_unsigned_t source; source = displayofs+panadjust; // VW_ColorBorder (15); VW_SetLineWidth (40); VW_SetScreen (0,0); if (source<0x10000l-200*64) { // // copy top line first // for (y=0;y<200;y++) VW_ScreenToScreen (source+y*64,y*40,40,1); } else { // // copy bottom line first // for (y=199;y>=0;y--) VW_ScreenToScreen (source+y*64,y*40,40,1); } IN_Shutdown (); VW_WaitVBL(70); BE_ST_BiosScanCode(0); VW_WaitVBL(70); Quit (NULL); }
/* =============== GLimp_Shutdown =============== */ void GLimp_Shutdown( void ) { IN_Shutdown(); SDL_QuitSubSystem( SDL_INIT_VIDEO ); screen = NULL; }
void CL_Shutdown(void) { static qboolean isdown = false; if (isdown) { printf("recursive shutdown\n"); return; } isdown = true; #ifdef USE_CURL CL_HTTP_Cleanup(true); #endif CL_WriteConfiguration(); Key_WriteConsoleHistory(); OGG_Stop(); S_Shutdown(); IN_Shutdown(); VID_Shutdown(); }
//------------------------------------------------------------------------- // ShowSystem() //------------------------------------------------------------------------- void ShowSystem() { char avail[2][8]={"None","Present"}; MM_Startup (); CA_Startup (); IN_Startup (); PM_Startup (); SD_Startup (); fprint(show_text1); fprint(show_text2); fprint(show_text3); fprint(show_text5); printf(" Mouse: %s\n",avail[MousePresent]); printf(" Joystick: %s\n",avail[JoysPresent[0]||JoysPresent[1]]); printf(" AdLib: %s\n",avail[AdLibPresent&&!SoundBlasterPresent]); printf("Sound Blaster: %s\n",avail[SoundBlasterPresent]); printf(" Sound Source: %s\n\n",avail[SoundSourcePresent]); fprint(show_text2); SD_Shutdown (); PM_Shutdown (); IN_Shutdown (); CA_Shutdown (); MM_Shutdown (); }
/* =============== Host_Shutdown FIXME: this is a callback from Sys_Quit and Sys_Error. It would be better to run quit through here before the final handoff to the sys code. =============== */ void Host_Shutdown(void) { static qboolean isdown = false; if (isdown) { printf ("recursive shutdown\n"); return; } isdown = true; // keep Con_Printf from trying to update the screen scr_disabled_for_loading = true; Host_WriteConfiguration (); #ifdef PROQUAKE_EXTENSION IPLog_WriteLog (); // JPG 1.05 - ip loggging #endif if (con_initialized) History_Shutdown (); CDAudio_Shutdown (); NET_Shutdown (); S_Shutdown(); IN_Shutdown (); if (cls.state != ca_dedicated) { VID_Shutdown(); } }
/* =============== Host_Shutdown FIXME: this is a callback from Sys_Quit and Sys_Error. It would be better to run quit through here before the final handoff to the sys code. =============== */ void Host_Shutdown(void) { static qboolean isdown = false; if (isdown) { printf ("recursive shutdown\n"); return; } isdown = true; // keep Con_Printf from trying to update the screen scr_disabled_for_loading = true; Host_WriteConfiguration (); // jkrige - fmod sound system (music) //CDAudio_Shutdown (); // jkrige - fmod sound system (music) NET_Shutdown (); // jkrige - fmod sound system (system) FMOD_Shutdown(); // jkrige - fmod sound system (system) S_Shutdown(); IN_Shutdown (); if (cls.state != ca_dedicated) { VID_Shutdown(); } }
void Sys_Quit (void) { IN_Shutdown(); Com_ShutdownZoneMemory(); Com_ShutdownHunkMemory(); Sys_Exit(0); }
/* =============== GLimp_Shutdown =============== */ void GLimp_Shutdown( void ) { IN_Shutdown(); SDL_QuitSubSystem( SDL_INIT_VIDEO ); memset( &glConfig, 0, sizeof( glConfig ) ); memset( &glState, 0, sizeof( glState ) ); }
/* ============== Sys_Quit ============== */ void Sys_Quit( void ) { // timeEndPeriod( 1 ); IN_Shutdown(); Sys_DestroyConsole(); Q3CE_CloseAll(); exit (0); }
void ShutdownId (void) { US_Shutdown (); SD_Shutdown (); PM_Shutdown (); IN_Shutdown (); VW_Shutdown (); CA_Shutdown (); }
/* ============== Sys_Quit ============== */ void Sys_Quit( void ) { timeEndPeriod( 1 ); IN_Shutdown(); Sys_DestroyConsole(); Com_ShutdownZoneMemory(); Com_ShutdownHunkMemory(); exit (0); }
/* =============== GLimp_Shutdown =============== */ void WIN_Shutdown( void ) { Cmd_RemoveCommand("modelist"); Cmd_RemoveCommand("minimize"); IN_Shutdown(); SDL_QuitSubSystem( SDL_INIT_VIDEO ); screen = NULL; }
/* ** GLimp_Shutdown ** ** This routine does all OS specific shutdown procedures for the OpenGL ** subsystem. Under OpenGL this means NULLing out the current DC and ** HGLRC, deleting the rendering context, and releasing the DC acquired ** for the window. The state structure is also nulled out. ** */ void GLimp_Shutdown( void ) { IN_Shutdown(); screen = NULL; memset( &glConfig, 0, sizeof( glConfig ) ); memset( &glState, 0, sizeof( glState ) ); QGL_Shutdown(); }
void IN_Restart_f(void) { qbool old_mouse_active = mouse_active; IN_Shutdown(); IN_Init(); // if mouse was active before restart, try to re-activate it if (old_mouse_active) IN_ActivateMouse(); }
void ShutdownId (void) { US_Shutdown (); #ifndef PROFILE SD_Shutdown (); IN_Shutdown (); #endif VW_Shutdown (); CA_Shutdown (); MM_Shutdown (); }
void ShutdownId (void) { US_Shutdown (); // This line is completely useless... SD_Shutdown (); PM_Shutdown (); IN_Shutdown (); VW_Shutdown (); CA_Shutdown (); #if defined(GP2X_940) GP2X_Shutdown(); #endif }
void IN_Restart_f(void) { if (!host_initialized) { // Sanity Com_Printf("Can't do %s yet\n", Cmd_Argv(0)); return; } IN_Shutdown(); IN_Init(); }
/* * CL_ShutdownInput */ void CL_ShutdownInput( void ) { if( !in_initialized ) return; Cmd_RemoveCommand( "in_restart" ); IN_Shutdown(); Cmd_RemoveCommand( "centerview" ); Cmd_RemoveCommand( "+moveup" ); Cmd_RemoveCommand( "-moveup" ); Cmd_RemoveCommand( "+movedown" ); Cmd_RemoveCommand( "-movedown" ); Cmd_RemoveCommand( "+left" ); Cmd_RemoveCommand( "-left" ); Cmd_RemoveCommand( "+right" ); Cmd_RemoveCommand( "-right" ); Cmd_RemoveCommand( "+forward" ); Cmd_RemoveCommand( "-forward" ); Cmd_RemoveCommand( "+back" ); Cmd_RemoveCommand( "-back" ); Cmd_RemoveCommand( "+lookup" ); Cmd_RemoveCommand( "-lookup" ); Cmd_RemoveCommand( "+lookdown" ); Cmd_RemoveCommand( "-lookdown" ); Cmd_RemoveCommand( "+strafe" ); Cmd_RemoveCommand( "-strafe" ); Cmd_RemoveCommand( "+moveleft" ); Cmd_RemoveCommand( "-moveleft" ); Cmd_RemoveCommand( "+moveright" ); Cmd_RemoveCommand( "-moveright" ); Cmd_RemoveCommand( "+speed" ); Cmd_RemoveCommand( "-speed" ); Cmd_RemoveCommand( "+attack" ); Cmd_RemoveCommand( "-attack" ); Cmd_RemoveCommand( "+use" ); Cmd_RemoveCommand( "-use" ); Cmd_RemoveCommand( "+klook" ); Cmd_RemoveCommand( "-klook" ); // wsw Cmd_RemoveCommand( "+special" ); Cmd_RemoveCommand( "-special" ); Cmd_RemoveCommand( "+zoom" ); Cmd_RemoveCommand( "-zoom" ); Dynvar_Destroy( Dynvar_Lookup( "m_filterBufferDecay" ) ); Dynvar_Destroy( Dynvar_Lookup( "m_filterBufferSize" ) ); Mem_ZoneFree( buf_x ); Mem_ZoneFree( buf_y ); in_initialized = true; }
/* =============== GLimp_Shutdown =============== */ void GLimp_Shutdown( void ) { float oldDisplayAspect = glConfig.displayAspect; IN_Shutdown(); SDL_QuitSubSystem( SDL_INIT_VIDEO ); screen = NULL; Com_Memset( &glConfig, 0, sizeof( glConfig ) ); glConfig.displayAspect = oldDisplayAspect; Com_Memset( &glState, 0, sizeof( glState ) ); }
/* =============== GLimp_Shutdown =============== */ void GLimp_Shutdown( void ) { IN_Shutdown(); #ifdef HAVE_GLES EGL_Close(); #endif SDL_QuitSubSystem( SDL_INIT_VIDEO ); screen = NULL; Com_Memset( &glConfig, 0, sizeof( glConfig ) ); Com_Memset( &glState, 0, sizeof( glState ) ); }
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 ================= */ 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 ); }
/** * @brief GLimp_Shutdown */ void GLimp_Shutdown(void) { IN_Shutdown(); if (main_renderer) { SDL_DestroyRenderer(main_renderer); main_renderer = NULL; } if (main_window) { SDL_DestroyWindow(main_window); main_window = NULL; } SDL_QuitSubSystem(SDL_INIT_VIDEO); }
/* ** GLimp_Shutdown ** ** This routine does all OS specific shutdown procedures for the OpenGL ** subsystem. */ void GLimp_Shutdown( void ) { // FIXME: Brian, we need better fallbacks from partially initialized failures VID_Printf( PRINT_ALL, "Shutting down OpenGL subsystem\n" ); // Set the gamma back to normal // GLimp_SetGamma(1.f); // kill input system (tied to window) IN_Shutdown(); // shutdown QGL subsystem GLW_Shutdown(); QGL_Shutdown(); memset( &glConfig, 0, sizeof( glConfig ) ); memset( &glState, 0, sizeof( glState ) ); }
/* ================= 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); }