diff options
author | Tim Angus <tim@ngus.net> | 2009-10-03 15:17:16 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:38 +0000 |
commit | 6d2ffb4c637a49983bc6ce22b68ccec0ed09e0f4 (patch) | |
tree | ff15343e4a2ae5a2512c1c21e05a3821a46f10da /src/client/snd_main.c | |
parent | e9e52d0b7ec9bae071534df7581126d69d3e9bf8 (diff) |
* Merge ioq3-r1637
Diffstat (limited to 'src/client/snd_main.c')
-rw-r--r-- | src/client/snd_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/snd_main.c b/src/client/snd_main.c index d3391b23..c386cd75 100644 --- a/src/client/snd_main.c +++ b/src/client/snd_main.c @@ -32,6 +32,7 @@ cvar_t *s_musicVolume; cvar_t *s_doppler; cvar_t *s_backend; cvar_t *s_muteWhenMinimized; +cvar_t *s_muteWhenUnfocused; static soundInterface_t si; @@ -230,7 +231,8 @@ S_Update */ void S_Update( void ) { - if( s_muteWhenMinimized->integer && com_minimized->integer ) { + if( ( s_muteWhenMinimized->integer && com_minimized->integer ) || + ( s_muteWhenUnfocused->integer && com_unfocused->integer ) ) { S_StopAllSounds( ); return; } @@ -466,6 +468,7 @@ void S_Init( void ) s_doppler = Cvar_Get( "s_doppler", "1", CVAR_ARCHIVE ); s_backend = Cvar_Get( "s_backend", "", CVAR_ROM ); s_muteWhenMinimized = Cvar_Get( "s_muteWhenMinimized", "0", CVAR_ARCHIVE ); + s_muteWhenUnfocused = Cvar_Get( "s_muteWhenUnfocused", "0", CVAR_ARCHIVE ); cv = Cvar_Get( "s_initsound", "1", 0 ); if( !cv->integer ) { |