mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-30 16:01:46 +00:00
Move Event processor call down below the mouse checks.
Only send mouse events if both values are non-zero. Hopefully this helps with the event overflow spam that can sometimes happen on loads or laggy situations.
This commit is contained in:
parent
d7f00e2b65
commit
b9e97b3857
1 changed files with 6 additions and 1 deletions
|
@ -802,7 +802,11 @@ static void IN_ProcessEvents( void )
|
||||||
|
|
||||||
case SDL_MOUSEMOTION:
|
case SDL_MOUSEMOTION:
|
||||||
if( mouseActive )
|
if( mouseActive )
|
||||||
|
{
|
||||||
|
if( !e.motion.xrel && !e.motion.yrel )
|
||||||
|
break;
|
||||||
Com_QueueEvent( 0, SE_MOUSE, e.motion.xrel, e.motion.yrel, 0, NULL );
|
Com_QueueEvent( 0, SE_MOUSE, e.motion.xrel, e.motion.yrel, 0, NULL );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
|
@ -883,7 +887,6 @@ void IN_Frame( void )
|
||||||
qboolean loading;
|
qboolean loading;
|
||||||
|
|
||||||
IN_JoyMove( );
|
IN_JoyMove( );
|
||||||
IN_ProcessEvents( );
|
|
||||||
|
|
||||||
// If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading
|
// If not DISCONNECTED (main menu) or ACTIVE (in game), we're loading
|
||||||
loading = ( clc.state != CA_DISCONNECTED && clc.state != CA_ACTIVE );
|
loading = ( clc.state != CA_DISCONNECTED && clc.state != CA_ACTIVE );
|
||||||
|
@ -906,6 +909,8 @@ void IN_Frame( void )
|
||||||
else
|
else
|
||||||
IN_ActivateMouse( );
|
IN_ActivateMouse( );
|
||||||
|
|
||||||
|
IN_ProcessEvents( );
|
||||||
|
|
||||||
// In case we had to delay actual restart of video system
|
// In case we had to delay actual restart of video system
|
||||||
if( ( vidRestartTime != 0 ) && ( vidRestartTime < Sys_Milliseconds( ) ) )
|
if( ( vidRestartTime != 0 ) && ( vidRestartTime < Sys_Milliseconds( ) ) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue