Beispiel #1
0
void IN_Frame()
{
	if ( in_xbox360ControllerAvailable->integer )
	{
		IN_Xbox360ControllerMove();
	}
	else
	{
		IN_JoyMove();
	}

	if ( cls.keyCatchers & KEYCATCH_CONSOLE )
	{
		// Console is down in windowed mode
		IN_SetFocus( false );
	}
	else if ( !( SDL_GetWindowFlags( window ) & SDL_WINDOW_INPUT_FOCUS ) )
	{
		// Window doesn't have focus
		IN_SetFocus( false );
	}
	else if ( com_minimized->integer )
	{
		// Minimized
		IN_SetFocus( false );
	}
	else
	{
		IN_SetFocus( true );
	}

	IN_ProcessEvents( dropInput );
}
Beispiel #2
0
void IN_Frame() {
    bool loading;

    if (in_xbox360ControllerAvailable->integer) {
        IN_Xbox360ControllerMove();
    } else {
        IN_JoyMove();
    }

    // If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading
    loading = (cls.state != CA_DISCONNECTED && cls.state != CA_ACTIVE);

    if (cls.keyCatchers & KEYCATCH_CONSOLE) {
        // Console is down in windowed mode
        IN_DeactivateMouse(false);
    } else if (loading) {
        // Loading in windowed mode
        IN_DeactivateMouse(true);
    } else if (!(SDL_GetWindowFlags(window) & SDL_WINDOW_INPUT_FOCUS)) {
        // Window doesn't have focus
        IN_DeactivateMouse(false);
    } else if (com_minimized->integer) {
        // Minimized
        IN_DeactivateMouse(true);
    } else {
        IN_ActivateMouse();
    }

    IN_ProcessEvents(dropInput);
}
Beispiel #3
0
/*
===============
IN_Frame
===============
*/
void IN_Frame( void )
{
	qboolean loading;

	if ( in_xbox360ControllerAvailable->integer )
	{
		IN_Xbox360ControllerMove();
	}
	else
	{
		IN_JoyMove();
	}

	IN_ProcessEvents();

	// If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading
	loading = !!( cls.state != CA_DISCONNECTED && cls.state != CA_ACTIVE );

	if ( !Cvar_VariableIntegerValue( "r_fullscreen" ) && ( cls.keyCatchers & KEYCATCH_CONSOLE ) )
	{
		// Console is down in windowed mode
		IN_DeactivateMouse();
	}
	else if ( !Cvar_VariableIntegerValue( "r_fullscreen" ) && loading )
	{
		// Loading in windowed mode
		IN_DeactivateMouse();
	}
	else if ( !( SDL_GetAppState() & SDL_APPINPUTFOCUS ) )
	{
		// Window not got focus
		IN_DeactivateMouse();
	}
	else if ( com_minimized->integer )
	{
		// Minimized
		IN_DeactivateMouse();
	}
	else
	{
		IN_ActivateMouse();
	}

	/* in case we had to delay actual restart of video system... */
	if ( ( vidRestartTime != 0 ) && ( vidRestartTime < Sys_Milliseconds() ) )
	{
		vidRestartTime = 0;
		Cbuf_AddText( "vid_restart\n" );
	}
}
Beispiel #4
0
void IN_Frame( void )
{
	qboolean loading;

	if ( in_xbox360ControllerAvailable->integer )
	{
		IN_Xbox360ControllerMove();
	}
	else
	{
		IN_JoyMove();
	}

	IN_ProcessEvents( dropInput );
	dropInput = qfalse;

	// If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading
	loading = ( cls.state != CA_DISCONNECTED && cls.state != CA_ACTIVE );

	if ( ( !cls.glconfig.isFullscreen || SDL_VERSION_ATLEAST( 2, 0, 0 ) ) &&
	     ( cls.keyCatchers & KEYCATCH_CONSOLE || ( CL_UIOwnsMouse() && !in_uigrab->integer ) ) )
	{
		// Console is down, or UI is up, in windowed mode
		IN_DeactivateMouse( qfalse );
	}
	else if ( ( !cls.glconfig.isFullscreen || SDL_VERSION_ATLEAST( 2, 0, 0 ) ) && loading )
	{
		// Loading in windowed mode
		IN_DeactivateMouse( qtrue );
	}
	else if ( !( SDL_GetWindowFlags( window ) & SDL_WINDOW_INPUT_FOCUS ) )
	{
		// Window not got focus
		IN_DeactivateMouse( qfalse );
	}
	else if ( com_minimized->integer )
	{
		// Minimized
		IN_DeactivateMouse( qtrue );
	}
	else
	{
		IN_ActivateMouse();
	}
}