Skip to content

Commit c758f1a

Browse files
authored
Add option to mute notification sounds altogether. (#6390)
1 parent 1d9de85 commit c758f1a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

soh/soh/Notification/Notification.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void Emit(Options notification) {
131131
notification.remainingTime = CVarGetFloat(CVAR_SETTING("Notifications.Duration"), 10.0f);
132132
}
133133
notifications.push_back(notification);
134-
if (!notification.mute) {
134+
if (!notification.mute && !CVarGetInteger(CVAR_SETTING("Notifications.Mute"), 0)) {
135135
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
136136
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
137137
}

soh/soh/SohGui/SohMenuSettings.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ void SohMenu::AddMenuSettings() {
520520
});
521521
})
522522
.Options(ButtonOptions().Tooltip("Displays a test notification."));
523+
AddWidget(path, "Mute Notification Sound", WIDGET_CVAR_CHECKBOX)
524+
.CVar(CVAR_SETTING("Notifications.Mute"))
525+
.RaceDisable(false)
526+
.Options(CheckboxOptions().Tooltip("Prevent notifications from playing a sound."));
523527

524528
// Mod Menu
525529
path.sidebarName = "Mod Menu";

0 commit comments

Comments
 (0)