示例#1
0
/*
=============
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);
}
示例#2
0
/*
==============
Sys_Quit
==============
*/
void Sys_Quit(void)
{
	timeEndPeriod(1);
	Sys_ShutdownInput();
	Sys_DestroyConsole();
	ExitProcess(0);
}
示例#3
0
/*
=================
Sys_In_Restart_f

Restart the input subsystem
=================
*/
void Sys_In_Restart_f(const idCmdArgs &args)
{
	Sys_ShutdownInput();
	Sys_InitInput();
}
示例#4
0
/*
=================
Sys_Shutdown
=================
*/
void Sys_Shutdown( void ) {
	Sys_EndProfiling();
	Sys_ShutdownInput();	
	Sys_ShutdownNetworking();
}