forked from rosebudai/OpenRCT2-Web
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:
1 parent
69d76a3263
commit
c99d28116f
2 files changed
+4
-7
No files matched your search
@@ -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