yuzu-emu
/
yuzu
Archived
1
0
Fork 0

Merge pull request #11669 from german77/settings2

yuzu: Fix custom rtc and mute audio settings
This commit is contained in:
liamwhite 2023-10-07 10:55:21 -04:00 committed by GitHub
commit fc4cde7513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 2 deletions

View File

@ -1078,6 +1078,10 @@ void System::ApplySettings() {
impl->RefreshTime(); impl->RefreshTime();
if (IsPoweredOn()) { if (IsPoweredOn()) {
if (Settings::values.custom_rtc_enabled) {
const s64 posix_time{Settings::values.custom_rtc.GetValue()};
GetTimeManager().UpdateLocalSystemClockTime(posix_time);
}
Renderer().RefreshBaseSettings(); Renderer().RefreshBaseSettings();
} }
} }

View File

@ -42,6 +42,9 @@ void ConfigureAudio::Setup(const ConfigurationShared::Builder& builder) {
for (auto* setting : Settings::values.linkage.by_category[category]) { for (auto* setting : Settings::values.linkage.by_category[category]) {
settings.push_back(setting); settings.push_back(setting);
} }
for (auto* setting : UISettings::values.linkage.by_category[category]) {
settings.push_back(setting);
}
}; };
push(Settings::Category::Audio); push(Settings::Category::Audio);

View File

@ -29,9 +29,10 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent) {
INSERT(Settings, sink_id, "Output Engine:", ""); INSERT(Settings, sink_id, "Output Engine:", "");
INSERT(Settings, audio_output_device_id, "Output Device:", ""); INSERT(Settings, audio_output_device_id, "Output Device:", "");
INSERT(Settings, audio_input_device_id, "Input 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, volume, "Volume:", "");
INSERT(Settings, dump_audio_commands, "", ""); INSERT(Settings, dump_audio_commands, "", "");
INSERT(UISettings, mute_when_in_background, "Mute audio when in background", "");
// Core // Core
INSERT(Settings, use_multi_core, "Multicore CPU Emulation", ""); INSERT(Settings, use_multi_core, "Multicore CPU Emulation", "");

View File

@ -1447,6 +1447,7 @@ void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) {
Settings::values.audio_muted = false; Settings::values.audio_muted = false;
auto_muted = false; auto_muted = false;
} }
UpdateVolumeUI();
} }
} }

View File

@ -103,7 +103,7 @@ struct Values {
true, true,
true}; true};
Setting<bool> mute_when_in_background{ Setting<bool> mute_when_in_background{
linkage, false, "muteWhenInBackground", Category::Ui, Settings::Specialization::Default, linkage, false, "muteWhenInBackground", Category::Audio, Settings::Specialization::Default,
true, true}; true, true};
Setting<bool> hide_mouse{ Setting<bool> hide_mouse{
linkage, true, "hideInactiveMouse", Category::UiGeneral, Settings::Specialization::Default, linkage, true, "hideInactiveMouse", Category::UiGeneral, Settings::Specialization::Default,