]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Mathieu should have set the snd_* cvars properly, not poking .integer
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Jul 2006 11:41:34 +0000 (11:41 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Jul 2006 11:41:34 +0000 (11:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6523 d7cf8633-e32d-0410-b094-e92efae38249

snd_main.c

index 310a93b60fc3aa7533862314831676d8159769a3..a9b7f3aea04880b59bac33973911029e011b888b 100644 (file)
@@ -627,9 +627,12 @@ void S_Startup (void)
                           chosen_fmt.speed, chosen_fmt.channels, chosen_fmt.width * 8);
 
        // Update the cvars
-       snd_speed.integer = chosen_fmt.speed;
-       snd_width.integer = chosen_fmt.width;
-       snd_channels.integer = chosen_fmt.channels;
+       if (snd_speed.integer != (int)chosen_fmt.speed)
+               Cvar_SetValueQuick(&snd_speed, chosen_fmt.speed);
+       if (snd_width.integer != chosen_fmt.width)
+               Cvar_SetValueQuick(&snd_width, chosen_fmt.width);
+       if (snd_channels.integer != chosen_fmt.channels)
+               Cvar_SetValueQuick(&snd_channels, chosen_fmt.channels);
 
        current_channellayout_used = SND_CHANNELLAYOUT_AUTO;
        S_SetChannelLayout();