From: havoc Date: Sun, 23 Jul 2006 11:41:34 +0000 (+0000) Subject: Mathieu should have set the snd_* cvars properly, not poking .integer X-Git-Tag: xonotic-v0.1.0preview~3857 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0aa07db479084620f1d966b3d5a7e2d8848adb1c;p=xonotic%2Fdarkplaces.git Mathieu should have set the snd_* cvars properly, not poking .integer git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6523 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/snd_main.c b/snd_main.c index 310a93b6..a9b7f3ae 100644 --- a/snd_main.c +++ b/snd_main.c @@ -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();