[quake3-commits] r1588 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Sep 14 12:25:29 EDT 2009


Author: icculus
Date: 2009-09-14 12:25:29 -0400 (Mon, 14 Sep 2009)
New Revision: 1588

Modified:
   trunk/code/client/snd_main.c
Log:
Added s_muteWhenUnfocused cvar (thanks, Chris!).

 Fixes Bugzilla #3768.



Modified: trunk/code/client/snd_main.c
===================================================================
--- trunk/code/client/snd_main.c	2009-09-14 15:45:52 UTC (rev 1587)
+++ trunk/code/client/snd_main.c	2009-09-14 16:25:29 UTC (rev 1588)
@@ -31,6 +31,7 @@
 cvar_t *s_doppler;
 cvar_t *s_backend;
 cvar_t *s_muteWhenMinimized;
+cvar_t *s_muteWhenUnfocused;
 
 static soundInterface_t si;
 
@@ -228,7 +229,8 @@
 */
 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;
 	}
@@ -451,6 +453,7 @@
 	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 ) {



More information about the quake3-commits mailing list