Merge branch 'no-audio-option' into 'master'

`-noaudio` option to cover `-nomusic` and `-nosound`

See merge request KartKrew/Kart-Public!129
This commit is contained in:
wolfs 2019-04-26 06:37:02 -04:00
commit 4dff8b4a11
2 changed files with 21 additions and 10 deletions

View file

@ -1390,6 +1390,16 @@ void D_SRB2Main(void)
midi_disabled = true; midi_disabled = true;
#endif #endif
} }
if (M_CheckParm("-noaudio")) // combines -nosound and -nomusic
{
sound_disabled = true;
digital_disabled = true;
#ifndef NO_MIDI
midi_disabled = true;
#endif
}
else
{
if (M_CheckParm("-nosound")) if (M_CheckParm("-nosound"))
sound_disabled = true; sound_disabled = true;
if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic if (M_CheckParm("-nomusic")) // combines -nomidimusic and -nodigmusic
@ -1408,6 +1418,7 @@ void D_SRB2Main(void)
if (M_CheckParm("-nodigmusic")) if (M_CheckParm("-nodigmusic"))
digital_disabled = true; // WARNING: DOS version initmusic in I_StartupSound digital_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
} }
}
if (!( sound_disabled && digital_disabled if (!( sound_disabled && digital_disabled
#ifndef NO_MIDI #ifndef NO_MIDI
&& midi_disabled && midi_disabled

View file

@ -2182,7 +2182,7 @@ static void Command_RestartAudio_f(void)
void GameSounds_OnChange(void) void GameSounds_OnChange(void)
{ {
if (M_CheckParm("-nosound")) if (M_CheckParm("-nosound") || M_CheckParm("-noaudio"))
return; return;
if (sound_disabled) if (sound_disabled)
@ -2196,7 +2196,7 @@ void GameSounds_OnChange(void)
void GameDigiMusic_OnChange(void) void GameDigiMusic_OnChange(void)
{ {
if (M_CheckParm("-nomusic")) if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio"))
return; return;
else if (M_CheckParm("-nodigmusic")) else if (M_CheckParm("-nodigmusic"))
return; return;
@ -2239,7 +2239,7 @@ void GameDigiMusic_OnChange(void)
#ifndef NO_MIDI #ifndef NO_MIDI
void GameMIDIMusic_OnChange(void) void GameMIDIMusic_OnChange(void)
{ {
if (M_CheckParm("-nomusic")) if (M_CheckParm("-nomusic") || M_CheckParm("-noaudio"))
return; return;
else if (M_CheckParm("-nomidimusic")) else if (M_CheckParm("-nomidimusic"))
return; return;