mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
settings: Add UiGeneral class
This commit is contained in:
parent
ea4afbfc54
commit
464aad52cd
@ -144,6 +144,9 @@ float Volume() {
|
||||
return values.volume.GetValue() / static_cast<f32>(values.volume.GetDefault());
|
||||
}
|
||||
|
||||
Linkage::Linkage() = default;
|
||||
Linkage::~Linkage() = default;
|
||||
|
||||
const char* TranslateCategory(Category category) {
|
||||
switch (category) {
|
||||
case Category::Audio:
|
||||
@ -176,6 +179,7 @@ const char* TranslateCategory(Category category) {
|
||||
case Category::Controls:
|
||||
return "Controls";
|
||||
case Category::Ui:
|
||||
case Category::UiGeneral:
|
||||
return "UI";
|
||||
case Category::UiLayout:
|
||||
return "UiLayout";
|
||||
|
@ -143,6 +143,7 @@ enum class Category : u32 {
|
||||
AddOns,
|
||||
Controls,
|
||||
Ui,
|
||||
UiGeneral,
|
||||
UiLayout,
|
||||
UiGameList,
|
||||
Screenshots,
|
||||
@ -209,8 +210,10 @@ public:
|
||||
|
||||
class Linkage {
|
||||
public:
|
||||
std::map<Category, std::forward_list<BasicSetting*>> by_category;
|
||||
std::vector<std::function<void()>> restore_functions;
|
||||
explicit Linkage();
|
||||
~Linkage();
|
||||
std::map<Category, std::forward_list<BasicSetting*>> by_category{};
|
||||
std::vector<std::function<void()>> restore_functions{};
|
||||
u32 count;
|
||||
};
|
||||
|
||||
|
@ -717,6 +717,7 @@ void Config::ReadUIValues() {
|
||||
ReadMultiplayerValues();
|
||||
|
||||
ReadCategory(Settings::Category::Ui);
|
||||
ReadCategory(Settings::Category::UiGeneral);
|
||||
|
||||
qt_config->endGroup();
|
||||
}
|
||||
|
@ -78,17 +78,18 @@ struct Values {
|
||||
Setting<bool> show_filter_bar{linkage, true, "showFilterBar", Category::Ui};
|
||||
Setting<bool> show_status_bar{linkage, true, "showStatusBar", Category::Ui};
|
||||
|
||||
Setting<bool> confirm_before_closing{linkage, true, "confirmClose", Category::Ui};
|
||||
Setting<bool> confirm_before_closing{linkage, true, "confirmClose", Category::UiGeneral};
|
||||
Setting<bool> first_start{linkage, true, "firstStart", Category::Ui};
|
||||
Setting<bool> pause_when_in_background{linkage, false, "pauseWhenInBackground", Category::Ui};
|
||||
Setting<bool> pause_when_in_background{linkage, false, "pauseWhenInBackground",
|
||||
Category::UiGeneral};
|
||||
Setting<bool> mute_when_in_background{linkage, false, "muteWhenInBackground", Category::Ui};
|
||||
Setting<bool> hide_mouse{linkage, true, "hideInactiveMouse", Category::Ui};
|
||||
Setting<bool> hide_mouse{linkage, true, "hideInactiveMouse", Category::UiGeneral};
|
||||
Setting<bool> controller_applet_disabled{linkage, false, "disableControllerApplet",
|
||||
Category::Ui};
|
||||
Category::UiGeneral};
|
||||
// Set when Vulkan is known to crash the application
|
||||
bool has_broken_vulkan = false;
|
||||
|
||||
Setting<bool> select_user_on_boot{linkage, false, "select_user_on_boot", Category::Ui};
|
||||
Setting<bool> select_user_on_boot{linkage, false, "select_user_on_boot", Category::UiGeneral};
|
||||
Setting<bool> disable_web_applet{linkage, true, "disable_web_applet", Category::Ui};
|
||||
|
||||
// Discord RPC
|
||||
|
Loading…
Reference in New Issue
Block a user