From 4a5a239639e9f9209431e6b577b14ec1280c7b74 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 22 Mar 2024 12:08:00 +0100 Subject: [PATCH] mute audio by default in debug builds --- src/settings.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/settings.rs b/src/settings.rs index ad74109..231feb8 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -36,9 +36,13 @@ pub struct Settings { impl Default for Settings { fn default() -> Self { + // Mute audio by default in debug builds + let default_mute_sfx = cfg!(debug_assertions); + let default_mute_music = cfg!(debug_assertions); + Settings { - mute_sfx: false, - mute_music: false, + mute_sfx: default_mute_sfx, + mute_music: default_mute_music, volume_sfx: 100, volume_music: 100, font_size_hud: 32.0,