Fix #21690: Muting ride music doesn't mute title music

This commit is contained in:
kaavyar 2024-04-21 19:24:25 -04:00
parent c4c706c59c
commit 4f9f9f1113
2 changed files with 7 additions and 1 deletions

View File

@ -1324,6 +1324,11 @@ static Widget *window_options_page_widgets[] = {
if (!gConfigSound.RideMusicEnabled)
{
OpenRCT2::RideAudio::StopAllChannels();
OpenRCT2::Audio::StopTitleMusic();
}
else
{
OpenRCT2::Audio::PlayTitleMusic();
}
ConfigSaveDefault();
Invalidate();

View File

@ -294,7 +294,8 @@ namespace OpenRCT2::Audio
void PlayTitleMusic()
{
if (gGameSoundsOff || !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) || gIntroState != IntroState::None)
if (gGameSoundsOff || !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) || gIntroState != IntroState::None
|| !gConfigSound.RideMusicEnabled)
{
StopTitleMusic();
return;