void VID_Close() { Sys_Thread_LockMutex(display_mutex); #ifndef GLQUAKE VID_SW_FreeBuffers(); #endif Skin_Shutdown(); Mod_ClearAll(); SCR_Shutdown(); Sbar_Shutdown(); M_VidShutdown(); Draw_Shutdown(); CSTC_PictureShutdown(); if (display) { R_Shutdown(); Sys_Video_Close(display); display = 0; } Sys_Thread_UnlockMutex(display_mutex); }
/* =============== 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 (); }
/** * @brief Saves configuration file and shuts the client systems down * @todo this is a callback from @c Sys_Quit and @c Com_Error. It would be better * to run quit through here before the final handoff to the sys code. * @sa Sys_Quit * @sa CL_Init */ void CL_Shutdown (void) { if (isdown) { printf("recursive shutdown\n"); return; } isdown = true; /* remove cvar feedback */ for (const cvar_t* var = Cvar_GetFirst(); var; var = var->next) { if (var->flags & CVAR_R_CONTEXT) Cvar_UnRegisterChangeListener(var->name, CL_RContextCvarChange); if (var->flags & CVAR_R_IMAGES) Cvar_UnRegisterChangeListener(var->name, CL_RImagesCvarChange); } GAME_SetMode(nullptr); GAME_UnloadGame(); CL_HTTP_Cleanup(); Irc_Shutdown(); Con_SaveConsoleHistory(); Key_WriteBindings("keys.cfg"); S_Shutdown(); R_Shutdown(); UI_Shutdown(); CIN_Shutdown(); SEQ_Shutdown(); GAME_Shutdown(); CL_LanguageShutdown(); TOTD_Shutdown(); SCR_Shutdown(); }
/* =============== CL_Shutdown =============== */ void CL_Shutdown( void ) { // already freed if( !cls.initialized ) return; cls.initialized = false; MsgDev( D_INFO, "CL_Shutdown()\n" ); Host_WriteOpenGLConfig (); Host_WriteVideoConfig (); CL_CloseDemoHeader(); IN_Shutdown (); SCR_Shutdown (); CL_UnloadProgs (); SCR_FreeCinematic (); // release AVI's *after* client.dll because custom renderer may use them S_Shutdown (); R_Shutdown (); }