mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-11 07:37:52 +00:00
engine: sdl: fix mouse activated when focus gained but not game is active
This commit is contained in:
parent
1bf08cc2c3
commit
89baa633c8
@ -340,7 +340,11 @@ static void SDLash_ActiveEvent( int gain )
|
||||
if( gain )
|
||||
{
|
||||
host.status = HOST_FRAME;
|
||||
IN_ActivateMouse( );
|
||||
if( cls.key_dest == key_game )
|
||||
{
|
||||
IN_ActivateMouse( );
|
||||
}
|
||||
|
||||
if( dma.initialized && snd_mute_losefocus.value )
|
||||
{
|
||||
SNDDMA_Activate( true );
|
||||
@ -360,7 +364,11 @@ static void SDLash_ActiveEvent( int gain )
|
||||
}
|
||||
#endif
|
||||
host.status = HOST_NOFOCUS;
|
||||
IN_DeactivateMouse();
|
||||
if( cls.key_dest == key_game )
|
||||
{
|
||||
IN_DeactivateMouse();
|
||||
}
|
||||
|
||||
if( dma.initialized && snd_mute_losefocus.value )
|
||||
{
|
||||
SNDDMA_Activate( false );
|
||||
|
Loading…
Reference in New Issue
Block a user