engine: sdl: fix mouse activated when focus gained but not game is active
This commit is contained in:
parent
1bf08cc2c3
commit
89baa633c8
1 changed files with 10 additions and 2 deletions
|
@ -340,7 +340,11 @@ static void SDLash_ActiveEvent( int gain )
|
||||||
if( gain )
|
if( gain )
|
||||||
{
|
{
|
||||||
host.status = HOST_FRAME;
|
host.status = HOST_FRAME;
|
||||||
IN_ActivateMouse( );
|
if( cls.key_dest == key_game )
|
||||||
|
{
|
||||||
|
IN_ActivateMouse( );
|
||||||
|
}
|
||||||
|
|
||||||
if( dma.initialized && snd_mute_losefocus.value )
|
if( dma.initialized && snd_mute_losefocus.value )
|
||||||
{
|
{
|
||||||
SNDDMA_Activate( true );
|
SNDDMA_Activate( true );
|
||||||
|
@ -360,7 +364,11 @@ static void SDLash_ActiveEvent( int gain )
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
host.status = HOST_NOFOCUS;
|
host.status = HOST_NOFOCUS;
|
||||||
IN_DeactivateMouse();
|
if( cls.key_dest == key_game )
|
||||||
|
{
|
||||||
|
IN_DeactivateMouse();
|
||||||
|
}
|
||||||
|
|
||||||
if( dma.initialized && snd_mute_losefocus.value )
|
if( dma.initialized && snd_mute_losefocus.value )
|
||||||
{
|
{
|
||||||
SNDDMA_Activate( false );
|
SNDDMA_Activate( false );
|
||||||
|
|
Loading…
Add table
Reference in a new issue