mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix muting game sounds instead of master sound
Clicking mute from the top toolbar or from with the hotkey will toggle the master volume instead of the game volume now, and invalidates the options window to immediately make the checkbox visible.
This commit is contained in:
committed by
Aaron van Geffen
parent
69d76a3263
commit
c99d28116f
@@ -768,11 +768,6 @@ static void window_options_mouseup(rct_window* w, rct_widgetindex widgetIndex)
|
||||
{
|
||||
case WIDX_SOUND_CHECKBOX:
|
||||
gConfigSound.sound_enabled = !gConfigSound.sound_enabled;
|
||||
if (!gConfigSound.sound_enabled)
|
||||
audio_pause_sounds();
|
||||
else
|
||||
audio_unpause_sounds();
|
||||
window_invalidate_by_class(WC_TOP_TOOLBAR);
|
||||
config_save_default();
|
||||
window_invalidate(w);
|
||||
break;
|
||||
|
||||
@@ -394,8 +394,8 @@ void audio_close()
|
||||
|
||||
void audio_toggle_all_sounds()
|
||||
{
|
||||
gConfigSound.sound_enabled = !gConfigSound.sound_enabled;
|
||||
if (gConfigSound.sound_enabled)
|
||||
gConfigSound.master_sound_enabled = !gConfigSound.master_sound_enabled;
|
||||
if (gConfigSound.master_sound_enabled)
|
||||
{
|
||||
audio_unpause_sounds();
|
||||
}
|
||||
@@ -404,6 +404,8 @@ void audio_toggle_all_sounds()
|
||||
audio_stop_title_music();
|
||||
audio_pause_sounds();
|
||||
}
|
||||
|
||||
window_invalidate_by_class(WC_OPTIONS);
|
||||
}
|
||||
|
||||
void audio_pause_sounds()
|
||||
|
||||
Reference in New Issue
Block a user