From 0aa07db479084620f1d966b3d5a7e2d8848adb1c Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 23 Jul 2006 11:41:34 +0000 Subject: [PATCH] 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 --- snd_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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(); -- 2.39.2