mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 20:11:47 +00:00
Merge branch 'fix-nosound' into 'master'
Fix -nosound command line option not disabling sound effects Closes #405 See merge request KartKrew/Kart!883
This commit is contained in:
commit
dfd13b5a7a
2 changed files with 3 additions and 29 deletions
|
|
@ -2331,24 +2331,6 @@ void S_ResumeAudio(void)
|
||||||
S_AdjustMusicStackTics();
|
S_AdjustMusicStackTics();
|
||||||
}
|
}
|
||||||
|
|
||||||
void S_DisableSound(void)
|
|
||||||
{
|
|
||||||
if (sound_started && !sound_disabled)
|
|
||||||
{
|
|
||||||
sound_disabled = true;
|
|
||||||
S_StopSounds();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void S_EnableSound(void)
|
|
||||||
{
|
|
||||||
if (sound_started && sound_disabled)
|
|
||||||
{
|
|
||||||
sound_disabled = false;
|
|
||||||
S_InitSfxChannels(cv_soundvolume.value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void S_SetMusicVolume(INT32 digvolume)
|
void S_SetMusicVolume(INT32 digvolume)
|
||||||
{
|
{
|
||||||
if (digvolume < 0)
|
if (digvolume < 0)
|
||||||
|
|
@ -2698,13 +2680,8 @@ static void PlaySoundIfUnfocused_OnChange(void)
|
||||||
if (!cv_gamesounds.value)
|
if (!cv_gamesounds.value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (window_notinfocus)
|
if (window_notinfocus && !cv_playsoundifunfocused.value)
|
||||||
{
|
S_StopSounds();
|
||||||
if (cv_playsoundifunfocused.value)
|
|
||||||
S_DisableSound();
|
|
||||||
else
|
|
||||||
S_EnableSound();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_OPENMPT
|
#ifdef HAVE_OPENMPT
|
||||||
|
|
|
||||||
|
|
@ -515,9 +515,6 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
|
||||||
|
|
||||||
S_InitMusicVolume();
|
S_InitMusicVolume();
|
||||||
|
|
||||||
if (cv_gamesounds.value)
|
|
||||||
S_EnableSound();
|
|
||||||
|
|
||||||
if (!firsttimeonmouse)
|
if (!firsttimeonmouse)
|
||||||
{
|
{
|
||||||
if (cv_usemouse.value) I_StartupMouse();
|
if (cv_usemouse.value) I_StartupMouse();
|
||||||
|
|
@ -534,7 +531,7 @@ static void Impl_HandleWindowEvent(SDL_WindowEvent evt)
|
||||||
if (!cv_playmusicifunfocused.value)
|
if (!cv_playmusicifunfocused.value)
|
||||||
I_SetMusicVolume(0);
|
I_SetMusicVolume(0);
|
||||||
if (!cv_playsoundifunfocused.value)
|
if (!cv_playsoundifunfocused.value)
|
||||||
S_DisableSound();
|
S_StopSounds();
|
||||||
|
|
||||||
if (!disable_mouse)
|
if (!disable_mouse)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue