VERY experimental Nintendo Switch 2 emulator
C++
yuzu: Fix mute when in background setting
Narr the Reg751b4e216262
diff --git a/src/yuzu/configuration/configure_audio.cpp b/src/yuzu/configuration/configure_audio.cppindex 9ccfb24352..81dd51ad36 100644--- a/src/yuzu/configuration/configure_audio.cpp+++ b/src/yuzu/configuration/configure_audio.cpp@@ -42,6 +42,9 @@ void ConfigureAudio::Setup(const ConfigurationShared::Builder& builder) {for (auto* setting : Settings::values.linkage.by_category[category]) {settings.push_back(setting);}+ for (auto* setting : UISettings::values.linkage.by_category[category]) {+ settings.push_back(setting);+ }};push(Settings::Category::Audio);diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cppindex 276bdbaba4..a4e8af1b4b 100644--- a/src/yuzu/configuration/shared_translation.cpp+++ b/src/yuzu/configuration/shared_translation.cpp@@ -29,9 +29,10 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent) {INSERT(Settings, sink_id, "Output Engine:", "");INSERT(Settings, audio_output_device_id, "Output Device:", "");INSERT(Settings, audio_input_device_id, "Input Device:", "");- INSERT(Settings, audio_muted, "Mute audio when in background", "");+ INSERT(Settings, audio_muted, "Mute audio", "");INSERT(Settings, volume, "Volume:", "");INSERT(Settings, dump_audio_commands, "", "");+ INSERT(UISettings, mute_when_in_background, "Mute audio when in background", "");// CoreINSERT(Settings, use_multi_core, "Multicore CPU Emulation", "");diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cppindex 16fa92e2c0..1753fec121 100644--- a/src/yuzu/main.cpp+++ b/src/yuzu/main.cpp@@ -1447,6 +1447,7 @@ void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {Settings::values.audio_muted = false;auto_muted = false;}+ UpdateVolumeUI();}}diff --git a/src/yuzu/uisettings.h b/src/yuzu/uisettings.hindex 8efd63f31f..8a2caa9ddf 100644--- a/src/yuzu/uisettings.h+++ b/src/yuzu/uisettings.h@@ -103,7 +103,7 @@ struct Values {true,true};Setting<bool> mute_when_in_background{- linkage, false, "muteWhenInBackground", Category::Ui, Settings::Specialization::Default,+ linkage, false, "muteWhenInBackground", Category::Audio, Settings::Specialization::Default,true, true};Setting<bool> hide_mouse{linkage, true, "hideInactiveMouse", Category::UiGeneral, Settings::Specialization::Default,