Beispiel #1
0
/*
================
Con_DestroyConsole

destroy win32 console
================
*/
void Con_DestroyConsole( void )
{
	// last text message into console or log 
	MsgDev( D_NOTE, "Sys_FreeLibrary: Unloading xash library\n" );

	Sys_CloseLog();
#ifdef _WIN32
	if( s_wcd.hWnd )
	{
		DeleteObject( s_wcd.hbrEditBackground );
                    DeleteObject( s_wcd.hfBufferFont );

		if( host.type == HOST_DEDICATED )
		{
			ShowWindow( s_wcd.hwndButtonSubmit, SW_HIDE );
			DestroyWindow( s_wcd.hwndButtonSubmit );
			s_wcd.hwndButtonSubmit = 0;

			ShowWindow( s_wcd.hwndInputLine, SW_HIDE );
			DestroyWindow( s_wcd.hwndInputLine );
			s_wcd.hwndInputLine = 0;
		}

		ShowWindow( s_wcd.hwndBuffer, SW_HIDE );
		DestroyWindow( s_wcd.hwndBuffer );
		s_wcd.hwndBuffer = 0;

		ShowWindow( s_wcd.hWnd, SW_HIDE );
		DestroyWindow( s_wcd.hWnd );
		s_wcd.hWnd = 0;
	}

	UnregisterClass( SYSCONSOLE, host.hInst );
#endif
	// place it here in case Sys_Crash working properly
#ifdef XASH_SDL
	if( host.hMutex ) SDL_DestroyMutex( host.hMutex );
#endif
}
Beispiel #2
0
/*
================
Con_DestroyConsole

destroy win32 console
================
*/
void Con_DestroyConsole( void )
{
    if(console_ui == 0) return;

    // last text message into console or log
    MsgDev( D_NOTE, "Sys_FreeLibrary: Unloading engine.dll\n" );

    Sys_CloseLog();

    if( s_wcd.hWnd )
    {
        DeleteObject( s_wcd.hbrEditBackground );
        DeleteObject( s_wcd.hfBufferFont );

        ShowWindow( s_wcd.hWnd, SW_HIDE );
        DestroyWindow( s_wcd.hWnd );
        s_wcd.hWnd = 0;
    }

    UnregisterClass( SYSCONSOLE, host.hInst );

    // place it here in case Sys_Crash working properly
    if( host.hMutex ) CloseHandle( host.hMutex );
}