unmute sfx in cargo run by default

This commit is contained in:
yuni 2024-03-28 20:54:34 +01:00
parent e1bcb9bb7a
commit 5e9dbf0344

View file

@ -38,15 +38,13 @@ pub struct Settings {
impl Default for Settings {
fn default() -> Self {
let default_mute_sfx;
let default_mute_sfx = false;
let default_mute_music;
if let Ok(_) = env::var("CARGO") {
// Mute audio by default when run through `cargo`
default_mute_sfx = cfg!(debug_assertions);
default_mute_music = cfg!(debug_assertions);
}
else {
default_mute_sfx = false;
default_mute_music = false;
}