Do not set cvars with S_SetSfxVolume or S_SetMusicVolume
Don't do this because in sdl/i_video.cpp, S_InitMusicVolume is called to unmute music when the window is refocused. Because I_StartupGraphics is called before those cvars are added and it is an error to try to set a cvar before it is added.
This commit is contained in:
parent
272535fa17
commit
d6fa3023b7
1 changed files with 2 additions and 2 deletions
|
|
@ -983,7 +983,7 @@ void S_UpdateClosedCaptions(void)
|
|||
|
||||
void S_SetSfxVolume(INT32 volume)
|
||||
{
|
||||
CV_SetValue(&cv_soundvolume, volume);
|
||||
//CV_SetValue(&cv_soundvolume, volume);
|
||||
actualsfxvolume = cv_soundvolume.value * USER_VOLUME_SCALE;
|
||||
|
||||
#ifdef HW3SOUND
|
||||
|
|
@ -2424,7 +2424,7 @@ void S_SetMusicVolume(INT32 digvolume)
|
|||
if (digvolume < 0)
|
||||
digvolume = cv_digmusicvolume.value;
|
||||
|
||||
CV_SetValue(&cv_digmusicvolume, digvolume);
|
||||
//CV_SetValue(&cv_digmusicvolume, digvolume);
|
||||
actualdigmusicvolume = cv_digmusicvolume.value * USER_VOLUME_SCALE;
|
||||
I_SetMusicVolume(digvolume);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue