本文整理汇总了C++中Sys_Quit函数的典型用法代码示例。如果您正苦于以下问题:C++ Sys_Quit函数的具体用法?C++ Sys_Quit怎么用?C++ Sys_Quit使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Sys_Quit函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Com_Quit
/*
* Both client and server can use this, and it will
* do the apropriate things.
*/
void
Com_Quit(void)
{
Com_Printf("\n----------- shutting down ----------\n");
SV_Shutdown("Server quit\n", false);
Sys_Quit();
}
示例2: Sys_Error
/*
================
Sys_Error
================
*/
void Sys_Error (const char *error, ...)
{
static qbool inerror = false;
va_list argptr;
char text[1024];
sv_error = true;
if (inerror)
Sys_Exit (1);
inerror = true;
va_start (argptr,error);
vsnprintf (text, sizeof(text), error, argptr);
va_end (argptr);
if (!(int)sys_nostdout.value)
Sys_Printf ("ERROR: %s\n", text);
if (logs[ERROR_LOG].sv_logfile)
{
SV_Write_Log (ERROR_LOG, 1, va ("ERROR: %s\n", text));
// fclose (logs[ERROR_LOG].sv_logfile);
}
// FIXME: hack - checking SV_Shutdown with net_socket set in -1 NET_Shutdown
if (svs.socketip != -1)
SV_Shutdown (va("ERROR: %s\n", text));
if ((int)sys_restart_on_error.value)
Sys_Quit (true);
Sys_Exit (1);
}
示例3: SV_Quit_f
void SV_Quit_f (void)
{
SV_FinalMessage ("server shutdown\n");
Con_Printf ("Shutting down.\n");
SV_Shutdown ();
Sys_Quit ();
}
示例4: Sys_Error
void Sys_Error (char *error, ...)
{
va_list argptr;
printf ("Sys_Error: ");
va_start (argptr,error);
vprintf (error,argptr);
va_end (argptr);
printf ("\n");
printf("Press START to exit");
while(1){
hidScanInput();
u32 kDown = hidKeysDown();
if (kDown & KEY_START)
break;
}
if(hostInitialized)
Sys_Quit();
else
{
gfxExit();
exit (0);
}
}
示例5: Host_Quit
void Host_Quit()
{
CL_Disconnect ();
Host_ShutdownServer(false);
Sys_Quit ();
}
示例6: Demo_StopPlayback
void Demo_StopPlayback(void)
{
//float diff;
if(!playback)
return;
Con_Message("Demo was %.2f seconds (%i tics) long.",
(DEMOTIC - demoStartTic) / (float) TICSPERSEC,
DEMOTIC - demoStartTic);
playback = false;
lzClose(playdemo);
playdemo = 0;
fieldOfView = startFOV;
Net_StopGame();
/*
if(ArgCheck("-timedemo"))
{
diff = Sys_GetSeconds() - netConnectTime;
if(!diff)
diff = 1;
// Print summary and exit.
Con_Message("Timedemo results: %i game tics in %.1f seconds", r_framecounter, diff);
Con_Message("%f FPS", r_framecounter / diff);
Sys_Quit();
}
*/
// "Play demo once" mode?
if(CommandLine_Check("-playdemo"))
Sys_Quit();
}
示例7: Sys_Crash
long _stdcall Sys_Crash( PEXCEPTION_POINTERS pInfo )
{
// save config
if( host.state != HOST_CRASHED )
{
// check to avoid recursive call
error_on_exit = true;
host.crashed = true;
if( host.type == HOST_NORMAL )
CL_Crashed(); // tell client about crash
else host.state = HOST_CRASHED;
Msg( "Sys_Crash: call %p at address %p\n", pInfo->ExceptionRecord->ExceptionAddress, pInfo->ExceptionRecord->ExceptionCode );
if( host.developer <= 0 )
{
// no reason to call debugger in release build - just exit
Sys_Quit();
return EXCEPTION_CONTINUE_EXECUTION;
}
// all other states keep unchanged to let debugger find bug
Con_DestroyConsole();
}
if( host.oldFilter )
return host.oldFilter( pInfo );
return EXCEPTION_CONTINUE_EXECUTION;
}
示例8: Com_Quit
/*
* Com_Quit
*
* Both client and server can use this, and it will
* do the apropriate things.
*/
void Com_Quit( void )
{
if( dynvars_initialized )
{
dynvar_t *quit = Dynvar_Lookup( "quit" );
if( quit )
{
// wsw : aiwa : added "quit" event for pluggable clean-up (e.g. IRC shutdown)
Dynvar_CallListeners( quit, NULL );
}
Dynvar_Destroy( quit );
}
SV_Shutdown( "Server quit\n" );
CL_Shutdown();
MM_Shutdown();
if( log_file )
{
FS_FCloseFile( log_file );
log_file = 0;
}
Sys_Quit();
}
示例9: Sys_Break
/*
================
Sys_Break
same as Error
================
*/
void Sys_Break( const char *error, ... )
{
va_list argptr;
char text[MAX_SYSPATH];
if( host.state == HOST_ERR_FATAL )
return; // don't multiple executes
error_on_exit = true;
host.state = HOST_ERR_FATAL;
va_start( argptr, error );
Q_vsprintf( text, error, argptr );
va_end( argptr );
if( host.type == HOST_NORMAL )
{
if( host.hWnd ) ShowWindow( host.hWnd, SW_HIDE );
VID_RestoreGamma();
}
if( host.type != HOST_NORMAL || host.developer > 0 )
{
Con_ShowConsole( true );
Con_DisableInput(); // disable input line for dedicated server
Sys_Print( text );
Sys_WaitForQuit();
}
else
{
Con_ShowConsole( false );
MSGBOX( text );
}
Sys_Quit();
}
示例10: bi_Menu_Quit
static void
bi_Menu_Quit (progs_t *pr)
{
if (con_data.quit)
con_data.quit ();
Sys_Quit ();
}
示例11: CL_Quit_f
static void
CL_Quit_f (void)
{
if (!con_module)
Sys_Printf ("I hope you wanted to quit\n");
CL_Disconnect ();
Sys_Quit ();
}
示例12: Shutdown
/*
==================
idCommonLocal::Quit
==================
*/
void idCommonLocal::Quit() {
// don't try to shutdown if we are in a recursive error
if ( !com_errorEntered ) {
Shutdown();
}
Sys_Quit();
}
示例13: Com_Quit_f
/*
=============
Com_Quit_f
Both client and server can use this, and it will
do the apropriate things.
=============
*/
void Com_Quit_f( void ) {
// don't try to shutdown if we are in a recursive error
if ( !com_errorEntered ) {
SV_Shutdown ("Server quit\n");
CL_Shutdown ();
Com_Shutdown ();
}
Sys_Quit ();
}
示例14: CL_Quit_f
/*
CL_Quit_f
*/
void
CL_Quit_f (void)
{
if (confirm_quit->int_val) {
M_Menu_Quit_f ();
return;
}
CL_Disconnect ();
Sys_Quit ();
}
示例15: CL_Quit_f
/*
==================
CL_Quit_f
==================
*/
void CL_Quit_f (void)
{
if (1 /* key_dest != key_console */ /* && cls.state != ca_dedicated */)
{
//M_Menu_Quit_f ();
return;
}
CL_Disconnect ();
Sys_Quit ();
}