Ejemplo n.º 1
0
/*
===============
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 ();
}
Ejemplo n.º 2
0
/*
===============
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 ();
}
Ejemplo n.º 3
0
void CL_Crashed( void )
{
	// already freed
	if( host.state == HOST_CRASHED ) return;
	if( host.type != HOST_NORMAL ) return;
	if( !cls.initialized ) return;

	host.state = HOST_CRASHED;

	CL_Stop_f(); // stop any demos

	// send a disconnect message to the server
	CL_SendDisconnectMessage();

	Host_WriteOpenGLConfig();
	Host_WriteConfig();	// write config

	// never write video.cfg here because reason to crash may be provoked
	// with some renderer variables
	VID_RestoreGamma();
}