Take the command line params into account

Really I'm just making it return early if either of the parms are used.
This commit is contained in:
Steel Titanium 2018-11-25 22:39:11 -05:00
parent 7d4c9dda91
commit cf01e820c4
3 changed files with 19 additions and 3 deletions

View file

@ -1235,7 +1235,7 @@ void D_SRB2Main(void)
else
{
if (M_CheckParm("-nomidimusic"))
midi_disabled = true; ; // WARNING: DOS version initmusic in I_StartupSound
midi_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
if (M_CheckParm("-nodigmusic"))
digital_disabled = true; // WARNING: DOS version initmusic in I_StartupSound
}

View file

@ -1613,6 +1613,9 @@ static void Command_RestartAudio_f(void)
void GameSounds_OnChange(void)
{
if (M_CheckParm("-nosound"))
return;
if (sound_disabled)
{
sound_disabled = false;
@ -1628,6 +1631,11 @@ void GameSounds_OnChange(void)
void GameDigiMusic_OnChange(void)
{
if (M_CheckParm("-nomusic"))
return;
else if (M_CheckParm("-nodigmusic"))
return;
if (digital_disabled)
{
digital_disabled = false;
@ -1665,6 +1673,11 @@ void GameDigiMusic_OnChange(void)
void GameMIDIMusic_OnChange(void)
{
if (M_CheckParm("-nomusic"))
return;
else if (M_CheckParm("-nomidimusic"))
return;
if (midi_disabled)
{
midi_disabled = false;

View file

@ -2076,6 +2076,9 @@ void I_StartupTimer(void)
void I_Sleep(void)
{
if (dedicated)
SDL_Delay(15);
else
if (cv_sleep.value != -1)
SDL_Delay(cv_sleep.value);
}