コード例 #1
0
ファイル: host.c プロジェクト: libretro/tyrquake
/*
===============
Host_Shutdown

FIXME: this is a callback from Sys_Quit and Sys_Error.  It would be better
to run quit through here before the final handoff to the sys code.
===============
*/
void
Host_Shutdown(void)
{
    static qboolean isdown = false;

    if (isdown) {
	printf("recursive shutdown\n");
	return;
    }
    isdown = true;

// keep Con_Printf from trying to update the screen
    scr_disabled_for_loading = true;

    Host_WriteConfiguration();

    CDAudio_Shutdown();
    NET_Shutdown();
    BGM_Shutdown();
    S_Shutdown();
    IN_Shutdown();

    if (cls.state != ca_dedicated) {
	VID_Shutdown();
    }
}
コード例 #2
0
ファイル: win_main.cpp プロジェクト: Agustinlv/BlueHarvest
/*
=============
Sys_Error

Show the early console as an error dialog
=============
*/
void QDECL 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" );

	Sys_SetErrorText( text );
	Sys_ShowConsole( 1, qtrue );

	timeEndPeriod( 1 );

	IN_Shutdown();

	// wait for the user to quit
	while ( 1 ) {
		if (!GetMessage (&msg, NULL, 0, 0))
			Com_Quit_f ();
		TranslateMessage (&msg);
      	DispatchMessage (&msg);
	}

	Sys_DestroyConsole();
  	Com_ShutdownZoneMemory();
  	Com_ShutdownHunkMemory();

	exit (1);
}
コード例 #3
0
ファイル: cl_main.c プロジェクト: valgusk/yquake2
void
CL_Shutdown(void)
{
	static qboolean isdown = false;

	if (isdown)
	{
		printf("recursive shutdown\n");
		return;
	}

	isdown = true;

	CL_WriteConfiguration();

	Key_WriteConsoleHistory();

#ifdef CDA
	CDAudio_Shutdown();
#endif
#ifdef OGG
	OGG_Stop();
#endif
	S_Shutdown();
	IN_Shutdown();
	VID_Shutdown();
}
コード例 #4
0
ファイル: cl_main.c プロジェクト: Reedych/xash3d
/*
===============
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 ();
}
コード例 #5
0
ファイル: host.cpp プロジェクト: DrLabman/QMB
void Host_Shutdown(void) {
    static bool isdown = false;

    if (isdown) {
        printf("recursive shutdown\n");
        return;
    }
    isdown = true;

    // keep Con_Printf from trying to update the screen
    scr_disabled_for_loading = true;

    Host_WriteConfiguration();

    CDAudio_Shutdown();
    NET_Shutdown();
    S_Shutdown();
    IN_Shutdown();
    NN_deinit();

    TextureManager::clearAllTextures();
    Alias::shutdown();
    Cmd::shutdown();
    CVar::shutdown();
    MemoryObj::Flush(MemoryObj::ZONE);

    if (cls.state != ca_dedicated) {
        VID_Shutdown();
    }
    if (con_debuglog) {
        Con_CloseDebugLog();
    }
}
コード例 #6
0
ファイル: c4_debug.c プロジェクト: BSzili/refkeen
void PicturePause (void)
{
	id0_int_t	y;
	id0_unsigned_t	source;

	source = displayofs+panadjust;

//	VW_ColorBorder (15);
	VW_SetLineWidth (40);
	VW_SetScreen (0,0);

	if (source<0x10000l-200*64)
	{
	//
	// copy top line first
	//
		for (y=0;y<200;y++)
			VW_ScreenToScreen (source+y*64,y*40,40,1);
	}
	else
	{
	//
	// copy bottom line first
	//
		for (y=199;y>=0;y--)
			VW_ScreenToScreen (source+y*64,y*40,40,1);
	}

	IN_Shutdown ();

	VW_WaitVBL(70);
	BE_ST_BiosScanCode(0);
	VW_WaitVBL(70);
	Quit (NULL);
}
コード例 #7
0
ファイル: sdl_glimp.cpp プロジェクト: Hasimir/jedi-academy-1
/*
===============
GLimp_Shutdown
===============
*/
void GLimp_Shutdown( void )
{
	IN_Shutdown();

	SDL_QuitSubSystem( SDL_INIT_VIDEO );
	screen = NULL;
}
コード例 #8
0
ファイル: cl_main.c プロジェクト: Pickle/yquake2
void
CL_Shutdown(void)
{
	static qboolean isdown = false;

	if (isdown)
	{
		printf("recursive shutdown\n");
		return;
	}

	isdown = true;

#ifdef USE_CURL
	CL_HTTP_Cleanup(true);
#endif

	CL_WriteConfiguration();

	Key_WriteConsoleHistory();

	OGG_Stop();

	S_Shutdown();
	IN_Shutdown();
	VID_Shutdown();
}
コード例 #9
0
ファイル: jm_free.cpp プロジェクト: drhelius/bstone-ios
//-------------------------------------------------------------------------
// ShowSystem()
//-------------------------------------------------------------------------
void ShowSystem()
{
	char avail[2][8]={"None","Present"};

	MM_Startup ();
	CA_Startup ();
	IN_Startup ();
	PM_Startup ();
	SD_Startup ();

	fprint(show_text1);
	fprint(show_text2);
	fprint(show_text3);

	fprint(show_text5);

	printf("        Mouse: %s\n",avail[MousePresent]);
	printf("     Joystick: %s\n",avail[JoysPresent[0]||JoysPresent[1]]);
	printf("        AdLib: %s\n",avail[AdLibPresent&&!SoundBlasterPresent]);
	printf("Sound Blaster: %s\n",avail[SoundBlasterPresent]);
	printf(" Sound Source: %s\n\n",avail[SoundSourcePresent]);
	fprint(show_text2);

	SD_Shutdown ();
	PM_Shutdown ();
	IN_Shutdown ();
	CA_Shutdown ();
	MM_Shutdown ();
}
コード例 #10
0
/*
===============
Host_Shutdown

FIXME: this is a callback from Sys_Quit and Sys_Error.  It would be better
to run quit through here before the final handoff to the sys code.
===============
*/
void Host_Shutdown(void)
{
	static qboolean isdown = false;

	if (isdown)
	{
		printf ("recursive shutdown\n");
		return;
	}
	isdown = true;

// keep Con_Printf from trying to update the screen
	scr_disabled_for_loading = true;

	Host_WriteConfiguration ();
#ifdef PROQUAKE_EXTENSION
	IPLog_WriteLog ();	// JPG 1.05 - ip loggging
#endif
	if (con_initialized)
		History_Shutdown ();

	CDAudio_Shutdown ();
	NET_Shutdown ();
	S_Shutdown();
	IN_Shutdown ();

	if (cls.state != ca_dedicated)
	{
		VID_Shutdown();
	}
}
コード例 #11
0
ファイル: host.c プロジェクト: infernuslord/uqe-quake
/*
===============
Host_Shutdown

FIXME: this is a callback from Sys_Quit and Sys_Error.  It would be better
to run quit through here before the final handoff to the sys code.
===============
*/
void Host_Shutdown(void)
{
	static qboolean isdown = false;
	
	if (isdown)
	{
		printf ("recursive shutdown\n");
		return;
	}
	isdown = true;

// keep Con_Printf from trying to update the screen
	scr_disabled_for_loading = true;

	Host_WriteConfiguration (); 

	// jkrige - fmod sound system (music)
	//CDAudio_Shutdown ();
	// jkrige - fmod sound system (music)

	NET_Shutdown ();

	// jkrige - fmod sound system (system)
	FMOD_Shutdown();
	// jkrige - fmod sound system (system)

	S_Shutdown();
	IN_Shutdown ();

	if (cls.state != ca_dedicated)
	{
		VID_Shutdown();
	}
}
コード例 #12
0
ファイル: sys_unix.cpp プロジェクト: BSzili/OpenJK
void Sys_Quit (void) {
	IN_Shutdown();

	Com_ShutdownZoneMemory();
	Com_ShutdownHunkMemory();

	Sys_Exit(0);
}
コード例 #13
0
ファイル: sdl_glimp.cpp プロジェクト: iMp-Rex/OpenJK
/*
===============
GLimp_Shutdown
===============
*/
void 		GLimp_Shutdown( void )
{
	IN_Shutdown();

	SDL_QuitSubSystem( SDL_INIT_VIDEO );

	memset( &glConfig, 0, sizeof( glConfig ) );
	memset( &glState, 0, sizeof( glState ) );
}
コード例 #14
0
ファイル: q3ce_main.cpp プロジェクト: Jsoucek/q3ce
/*
==============
Sys_Quit
==============
*/
void Sys_Quit( void ) {
//	timeEndPeriod( 1 );
    IN_Shutdown();
    Sys_DestroyConsole();

    Q3CE_CloseAll();

    exit (0);
}
コード例 #15
0
void ShutdownId (void)
{
    US_Shutdown ();
    SD_Shutdown ();
    PM_Shutdown ();
    IN_Shutdown ();
    VW_Shutdown ();
    CA_Shutdown ();
}
コード例 #16
0
ファイル: win_main.cpp プロジェクト: Agustinlv/BlueHarvest
/*
==============
Sys_Quit
==============
*/
void Sys_Quit( void ) {
	timeEndPeriod( 1 );
	IN_Shutdown();
	Sys_DestroyConsole();
  	Com_ShutdownZoneMemory();
  	Com_ShutdownHunkMemory();

	exit (0);
}
コード例 #17
0
/*
===============
GLimp_Shutdown
===============
*/
void WIN_Shutdown( void )
{
	Cmd_RemoveCommand("modelist");
	Cmd_RemoveCommand("minimize");

	IN_Shutdown();

	SDL_QuitSubSystem( SDL_INIT_VIDEO );
	screen = NULL;
}
コード例 #18
0
/*
** GLimp_Shutdown
**
** This routine does all OS specific shutdown procedures for the OpenGL
** subsystem.  Under OpenGL this means NULLing out the current DC and
** HGLRC, deleting the rendering context, and releasing the DC acquired
** for the window.  The state structure is also nulled out.
**
*/
void GLimp_Shutdown( void )
{
  IN_Shutdown();
  screen = NULL;

  memset( &glConfig, 0, sizeof( glConfig ) );
  memset( &glState, 0, sizeof( glState ) );

  QGL_Shutdown();
}
コード例 #19
0
void IN_Restart_f(void)
{
	qbool old_mouse_active = mouse_active;

	IN_Shutdown();
	IN_Init();

	// if mouse was active before restart, try to re-activate it
	if (old_mouse_active)
		IN_ActivateMouse();
}
コード例 #20
0
void ShutdownId (void)
{
  US_Shutdown ();
#ifndef PROFILE
  SD_Shutdown ();
  IN_Shutdown ();
#endif
  VW_Shutdown ();
  CA_Shutdown ();
  MM_Shutdown ();
}
コード例 #21
0
ファイル: wl_main.cpp プロジェクト: EricSmekens/Wolf3DClient
void ShutdownId (void)
{
    US_Shutdown ();         // This line is completely useless...
    SD_Shutdown ();
    PM_Shutdown ();
    IN_Shutdown ();
    VW_Shutdown ();
    CA_Shutdown ();
#if defined(GP2X_940)
    GP2X_Shutdown();
#endif
}
コード例 #22
0
ファイル: in_win.c プロジェクト: jite/jquake
void IN_Restart_f(void)
{
	if (!host_initialized) 
	{ 
		// Sanity
		Com_Printf("Can't do %s yet\n", Cmd_Argv(0));
		return;
	}

	IN_Shutdown();
	IN_Init();
}
コード例 #23
0
ファイル: cl_input.c プロジェクト: tenght/qfusion
/*
* CL_ShutdownInput
*/
void CL_ShutdownInput( void )
{
	if( !in_initialized )
		return;

	Cmd_RemoveCommand( "in_restart" );

	IN_Shutdown();

	Cmd_RemoveCommand( "centerview" );
	Cmd_RemoveCommand( "+moveup" );
	Cmd_RemoveCommand( "-moveup" );
	Cmd_RemoveCommand( "+movedown" );
	Cmd_RemoveCommand( "-movedown" );
	Cmd_RemoveCommand( "+left" );
	Cmd_RemoveCommand( "-left" );
	Cmd_RemoveCommand( "+right" );
	Cmd_RemoveCommand( "-right" );
	Cmd_RemoveCommand( "+forward" );
	Cmd_RemoveCommand( "-forward" );
	Cmd_RemoveCommand( "+back" );
	Cmd_RemoveCommand( "-back" );
	Cmd_RemoveCommand( "+lookup" );
	Cmd_RemoveCommand( "-lookup" );
	Cmd_RemoveCommand( "+lookdown" );
	Cmd_RemoveCommand( "-lookdown" );
	Cmd_RemoveCommand( "+strafe" );
	Cmd_RemoveCommand( "-strafe" );
	Cmd_RemoveCommand( "+moveleft" );
	Cmd_RemoveCommand( "-moveleft" );
	Cmd_RemoveCommand( "+moveright" );
	Cmd_RemoveCommand( "-moveright" );
	Cmd_RemoveCommand( "+speed" );
	Cmd_RemoveCommand( "-speed" );
	Cmd_RemoveCommand( "+attack" );
	Cmd_RemoveCommand( "-attack" );
	Cmd_RemoveCommand( "+use" );
	Cmd_RemoveCommand( "-use" );
	Cmd_RemoveCommand( "+klook" );
	Cmd_RemoveCommand( "-klook" );
	// wsw
	Cmd_RemoveCommand( "+special" );
	Cmd_RemoveCommand( "-special" );
	Cmd_RemoveCommand( "+zoom" );
	Cmd_RemoveCommand( "-zoom" );
	Dynvar_Destroy( Dynvar_Lookup( "m_filterBufferDecay" ) );
	Dynvar_Destroy( Dynvar_Lookup( "m_filterBufferSize" ) );
	Mem_ZoneFree( buf_x );
	Mem_ZoneFree( buf_y );

	in_initialized = true;
}
コード例 #24
0
ファイル: sdl_glimp.c プロジェクト: norfenstein/umbra
/*
===============
GLimp_Shutdown
===============
*/
void GLimp_Shutdown( void )
{
    float oldDisplayAspect = glConfig.displayAspect;

    IN_Shutdown();

    SDL_QuitSubSystem( SDL_INIT_VIDEO );
    screen = NULL;

    Com_Memset( &glConfig, 0, sizeof( glConfig ) );
    glConfig.displayAspect = oldDisplayAspect;
    Com_Memset( &glState, 0, sizeof( glState ) );
}
コード例 #25
0
ファイル: sdl_glimp.c プロジェクト: ptitSeb/OpenArenaPandora
/*
===============
GLimp_Shutdown
===============
*/
void GLimp_Shutdown( void )
{
	IN_Shutdown();
	
	#ifdef HAVE_GLES
	EGL_Close();
	#endif

	SDL_QuitSubSystem( SDL_INIT_VIDEO );
	screen = NULL;

	Com_Memset( &glConfig, 0, sizeof( glConfig ) );
	Com_Memset( &glState, 0, sizeof( glState ) );
}
コード例 #26
0
ファイル: sys_main.cpp プロジェクト: Aura15/OpenJK
static void NORETURN Sys_Exit( int ex ) {
	IN_Shutdown();
#ifndef DEDICATED
	SDL_Quit();
#endif

	NET_Shutdown();

	Sys_PlatformExit();

	Com_ShutdownHunkMemory();
	Com_ShutdownZoneMemory();

	CON_Shutdown();

    exit( ex );
}
コード例 #27
0
ファイル: sys_main.cpp プロジェクト: DerSaidin/OpenWolf
/*
=================
Sys_Error
=================
*/
void Sys_Error( const char *error, ... ) {
	va_list argptr;
	char    string[4096];
#if defined (_WIN32) && !defined (_DEBUG)
	MSG		msg;
#endif

	va_start (argptr,error);
	idStr::vsnPrintf (string, sizeof(string), error, argptr);
	va_end (argptr);

#if defined (_WIN32) && !defined (_DEBUG)
	Conbuf_AppendText( string );
	Conbuf_AppendText( "\n" );
#else
	// Print text in the console window/box
	Sys_Print( string );
	Sys_Print( "\n" );
#endif

#if defined (_WIN32) && !defined (_DEBUG)
	Sys_SetErrorText( string );
	Sys_ShowConsole( 1, qtrue );

	timeEndPeriod( 1 );

	IN_Shutdown();

	// wait for the user to quit
	while ( 1 ) {
		if ( !GetMessage( &msg, NULL, 0, 0 ) ) {
			Com_Quit_f();
		}
		TranslateMessage( &msg );
		DispatchMessage( &msg );
	}

	Sys_DestroyConsole();
#endif

	CL_Shutdown( );
	Sys_ErrorDialog( string );

	Sys_Exit( 1 );
}
コード例 #28
0
ファイル: sdl_glimp.c プロジェクト: zturtleman/etlegacy
/**
 * @brief GLimp_Shutdown
 */
void GLimp_Shutdown(void)
{
	IN_Shutdown();

	if (main_renderer)
	{
		SDL_DestroyRenderer(main_renderer);
		main_renderer = NULL;
	}

	if (main_window)
	{
		SDL_DestroyWindow(main_window);
		main_window = NULL;
	}

	SDL_QuitSubSystem(SDL_INIT_VIDEO);
}
コード例 #29
0
/*
** GLimp_Shutdown
**
** This routine does all OS specific shutdown procedures for the OpenGL
** subsystem.
*/
void GLimp_Shutdown( void )
{
	// FIXME: Brian, we need better fallbacks from partially initialized failures
	VID_Printf( PRINT_ALL, "Shutting down OpenGL subsystem\n" );

	// Set the gamma back to normal
//	GLimp_SetGamma(1.f);

	// kill input system (tied to window)
	IN_Shutdown();

	// shutdown QGL subsystem
	GLW_Shutdown();
	QGL_Shutdown();

	memset( &glConfig, 0, sizeof( glConfig ) );
	memset( &glState, 0, sizeof( glState ) );
}
コード例 #30
0
ファイル: sys_main.c プロジェクト: belstgut/etlegacy
/*
=================
Sys_Error
=================
*/
void Sys_Error(const char *error, ...)
{
	va_list argptr;
	char    string[1024];
#ifdef USE_WINDOWS_CONSOLE
	MSG msg;
#endif

	va_start(argptr, error);
	Q_vsnprintf(string, sizeof(string), error, argptr);
	va_end(argptr);

#ifdef _WIN32
	Sys_Splash(qfalse);
#endif

#ifdef USE_WINDOWS_CONSOLE
	Conbuf_AppendText(string);
	Conbuf_AppendText("\n");

	Sys_SetErrorText(string);
	Sys_ShowConsoleWindow(1, qtrue);

	IN_Shutdown();

	// wait for the user to quit
	while (1)
	{
		if (!GetMessage(&msg, NULL, 0, 0))
		{
			Com_Quit_f();
		}

		TranslateMessage(&msg);
		DispatchMessage(&msg);
	}

	Sys_DestroyConsole();
#endif

	Sys_ErrorDialog(string);

	Sys_Exit(3);
}