From 1bc0b673aa2fc0510d332286e49f6c8d44568065 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 25 Jul 2023 22:31:21 -0400 Subject: backend: Remove usage of explicit operator overload Causes a crash on MSVC from a race condition on application quit. Intended to address yuzu-emu/yuzu/issues/11137 --- src/common/logging/backend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 6e8e8eb36..d4f27197c 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -108,7 +108,7 @@ public: using namespace Common::Literals; // Prevent logs from exceeding a set maximum size in the event that log entries are spammed. - const auto write_limit = Settings::values.extended_logging ? 1_GiB : 100_MiB; + const auto write_limit = Settings::values.extended_logging.GetValue() ? 1_GiB : 100_MiB; const bool write_limit_exceeded = bytes_written > write_limit; if (entry.log_level >= Level::Error || write_limit_exceeded) { if (write_limit_exceeded) { -- cgit v1.2.3 From 195403c87cf17e91c686fc98c27429d23974af73 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 25 Jul 2023 23:13:54 -0400 Subject: (ui)settings: Add more runtime_modifiable settings --- src/common/settings.h | 9 +++++---- src/yuzu/uisettings.h | 29 +++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/common/settings.h b/src/common/settings.h index 43ebeae9e..b0bc6519a 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -134,9 +134,10 @@ struct Values { Specialization::RuntimeList}; Setting audio_input_device_id{linkage, "auto", "input_device", Category::Audio, Specialization::RuntimeList}; - SwitchableSetting sound_index{linkage, AudioMode::Stereo, - AudioMode::Mono, AudioMode::Surround, - "sound_index", Category::SystemAudio}; + SwitchableSetting sound_index{ + linkage, AudioMode::Stereo, AudioMode::Mono, AudioMode::Surround, + "sound_index", Category::SystemAudio, Specialization::Default, true, + true}; SwitchableSetting volume{linkage, 100, 0, @@ -147,7 +148,7 @@ struct Values { true, true}; Setting audio_muted{ - linkage, false, "audio_muted", Category::Audio, Specialization::Default, false}; + linkage, false, "audio_muted", Category::Audio, Specialization::Default, false, true}; Setting dump_audio_commands{ linkage, false, "dump_audio_commands", Category::Audio, Specialization::Default, false}; diff --git a/src/yuzu/uisettings.h b/src/yuzu/uisettings.h index ee8c9f214..c9c89cee4 100644 --- a/src/yuzu/uisettings.h +++ b/src/yuzu/uisettings.h @@ -90,18 +90,35 @@ struct Values { Setting show_filter_bar{linkage, true, "showFilterBar", Category::Ui}; Setting show_status_bar{linkage, true, "showStatusBar", Category::Ui}; - Setting confirm_before_closing{linkage, true, "confirmClose", Category::UiGeneral}; + Setting confirm_before_closing{ + linkage, true, "confirmClose", Category::UiGeneral, Settings::Specialization::Default, + true, true}; Setting first_start{linkage, true, "firstStart", Category::Ui}; - Setting pause_when_in_background{linkage, false, "pauseWhenInBackground", - Category::UiGeneral}; - Setting mute_when_in_background{linkage, false, "muteWhenInBackground", Category::Ui}; - Setting hide_mouse{linkage, true, "hideInactiveMouse", Category::UiGeneral}; + Setting pause_when_in_background{linkage, + false, + "pauseWhenInBackground", + Category::UiGeneral, + Settings::Specialization::Default, + true, + true}; + Setting mute_when_in_background{ + linkage, false, "muteWhenInBackground", Category::Ui, Settings::Specialization::Default, + true, true}; + Setting hide_mouse{ + linkage, true, "hideInactiveMouse", Category::UiGeneral, Settings::Specialization::Default, + true, true}; Setting controller_applet_disabled{linkage, false, "disableControllerApplet", Category::UiGeneral}; // Set when Vulkan is known to crash the application bool has_broken_vulkan = false; - Setting select_user_on_boot{linkage, false, "select_user_on_boot", Category::UiGeneral}; + Setting select_user_on_boot{linkage, + false, + "select_user_on_boot", + Category::UiGeneral, + Settings::Specialization::Default, + true, + true}; Setting disable_web_applet{linkage, true, "disable_web_applet", Category::Ui}; // Discord RPC -- cgit v1.2.3