当前位置: 首页>>代码示例>>C++>>正文


C++ Sys_Quit函数代码示例

本文整理汇总了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();
}
开发者ID:tomgreen66,项目名称:yquake2,代码行数:11,代码来源:clientserver.c

示例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);
}
开发者ID:Classic-Fortress,项目名称:server,代码行数:40,代码来源:sv_sys_unix.c

示例3: SV_Quit_f

void SV_Quit_f (void)
{
	SV_FinalMessage ("server shutdown\n");
	Con_Printf ("Shutting down.\n");
	SV_Shutdown ();
	Sys_Quit ();
}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:7,代码来源:sv_ccmds.c

示例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);
	}
}
开发者ID:masterfeizz,项目名称:ctrQuake,代码行数:25,代码来源:sys_ctr.c

示例5: Host_Quit

void Host_Quit()
{
	CL_Disconnect ();
	Host_ShutdownServer(false);

	Sys_Quit ();
}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:7,代码来源:host_cmd.cpp

示例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();
}
开发者ID:roman313,项目名称:Doomsday-Engine,代码行数:34,代码来源:net_demo.cpp

示例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;
}
开发者ID:Tox86,项目名称:xash3d,代码行数:30,代码来源:sys_win.c

示例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();
}
开发者ID:ewirch,项目名称:qfusion,代码行数:31,代码来源:common.c

示例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();
}
开发者ID:bmk10,项目名称:sing-engine,代码行数:41,代码来源:sys_win.c

示例10: bi_Menu_Quit

static void
bi_Menu_Quit (progs_t *pr)
{
	if (con_data.quit)
		con_data.quit ();
	Sys_Quit ();
}
开发者ID:luaman,项目名称:qforge-1,代码行数:7,代码来源:menu.c

示例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 ();
}
开发者ID:EIREXE,项目名称:Quakeforge-gcw0,代码行数:8,代码来源:cl_main.c

示例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();
}
开发者ID:jeremiah-sypult,项目名称:DOOM-3-BFG,代码行数:13,代码来源:Common.cpp

示例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 ();
}
开发者ID:CairnTrenor,项目名称:OpenJK,代码行数:17,代码来源:common.cpp

示例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 ();
}
开发者ID:luaman,项目名称:qforge-newtree,代码行数:13,代码来源:cl_main.c

示例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 ();
}
开发者ID:jrk,项目名称:QuakeTM,代码行数:15,代码来源:cl_main.c


注:本文中的Sys_Quit函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。