settings: Consolidate RangedSetting's with regular ones

The latest git version of GCC has issues with my diamond inheritance
shenanigans. Since that's now two compilers that don't like it I thought
it'd be best to just axe all of it and just have the two templates like
before.

This rolls the features of BasicRangedSetting into BasicSetting, and
likewise RangedSetting into Setting. It also renames them from
BasicSetting and Setting to Setting and SwitchableSetting respectively.
Now longer name corresponds to more complex thing.
This commit is contained in:
lat9nq
2022-06-30 12:32:03 -04:00
parent 01bc0c84f0
commit ca36722a54
8 changed files with 230 additions and 318 deletions

View File

@ -64,28 +64,28 @@ struct Values {
QByteArray gamelist_header_state;
QByteArray microprofile_geometry;
Settings::BasicSetting<bool> microprofile_visible{false, "microProfileDialogVisible"};
Settings::Setting<bool> microprofile_visible{false, "microProfileDialogVisible"};
Settings::BasicSetting<bool> single_window_mode{true, "singleWindowMode"};
Settings::BasicSetting<bool> fullscreen{false, "fullscreen"};
Settings::BasicSetting<bool> display_titlebar{true, "displayTitleBars"};
Settings::BasicSetting<bool> show_filter_bar{true, "showFilterBar"};
Settings::BasicSetting<bool> show_status_bar{true, "showStatusBar"};
Settings::Setting<bool> single_window_mode{true, "singleWindowMode"};
Settings::Setting<bool> fullscreen{false, "fullscreen"};
Settings::Setting<bool> display_titlebar{true, "displayTitleBars"};
Settings::Setting<bool> show_filter_bar{true, "showFilterBar"};
Settings::Setting<bool> show_status_bar{true, "showStatusBar"};
Settings::BasicSetting<bool> confirm_before_closing{true, "confirmClose"};
Settings::BasicSetting<bool> first_start{true, "firstStart"};
Settings::BasicSetting<bool> pause_when_in_background{false, "pauseWhenInBackground"};
Settings::BasicSetting<bool> mute_when_in_background{false, "muteWhenInBackground"};
Settings::BasicSetting<bool> hide_mouse{true, "hideInactiveMouse"};
Settings::Setting<bool> confirm_before_closing{true, "confirmClose"};
Settings::Setting<bool> first_start{true, "firstStart"};
Settings::Setting<bool> pause_when_in_background{false, "pauseWhenInBackground"};
Settings::Setting<bool> mute_when_in_background{false, "muteWhenInBackground"};
Settings::Setting<bool> hide_mouse{true, "hideInactiveMouse"};
// Set when Vulkan is known to crash the application
Settings::BasicSetting<bool> has_broken_vulkan{false, "has_broken_vulkan"};
Settings::Setting<bool> has_broken_vulkan{false, "has_broken_vulkan"};
Settings::BasicSetting<bool> select_user_on_boot{false, "select_user_on_boot"};
Settings::Setting<bool> select_user_on_boot{false, "select_user_on_boot"};
// Discord RPC
Settings::BasicSetting<bool> enable_discord_presence{true, "enable_discord_presence"};
Settings::Setting<bool> enable_discord_presence{true, "enable_discord_presence"};
Settings::BasicSetting<bool> enable_screenshot_save_as{true, "enable_screenshot_save_as"};
Settings::Setting<bool> enable_screenshot_save_as{true, "enable_screenshot_save_as"};
QString roms_path;
QString symbols_path;
@ -100,25 +100,25 @@ struct Values {
// Shortcut name <Shortcut, context>
std::vector<Shortcut> shortcuts;
Settings::BasicSetting<uint32_t> callout_flags{0, "calloutFlags"};
Settings::Setting<uint32_t> callout_flags{0, "calloutFlags"};
// logging
Settings::BasicSetting<bool> show_console{false, "showConsole"};
Settings::Setting<bool> show_console{false, "showConsole"};
// Game List
Settings::BasicSetting<bool> show_add_ons{true, "show_add_ons"};
Settings::BasicSetting<uint32_t> game_icon_size{64, "game_icon_size"};
Settings::BasicSetting<uint32_t> folder_icon_size{48, "folder_icon_size"};
Settings::BasicSetting<uint8_t> row_1_text_id{3, "row_1_text_id"};
Settings::BasicSetting<uint8_t> row_2_text_id{2, "row_2_text_id"};
Settings::Setting<bool> show_add_ons{true, "show_add_ons"};
Settings::Setting<uint32_t> game_icon_size{64, "game_icon_size"};
Settings::Setting<uint32_t> folder_icon_size{48, "folder_icon_size"};
Settings::Setting<uint8_t> row_1_text_id{3, "row_1_text_id"};
Settings::Setting<uint8_t> row_2_text_id{2, "row_2_text_id"};
std::atomic_bool is_game_list_reload_pending{false};
Settings::BasicSetting<bool> cache_game_list{true, "cache_game_list"};
Settings::BasicSetting<bool> favorites_expanded{true, "favorites_expanded"};
Settings::Setting<bool> cache_game_list{true, "cache_game_list"};
Settings::Setting<bool> favorites_expanded{true, "favorites_expanded"};
QVector<u64> favorited_ids;
bool configuration_applied;
bool reset_to_defaults;
Settings::BasicSetting<bool> disable_web_applet{true, "disable_web_applet"};
Settings::Setting<bool> disable_web_applet{true, "disable_web_applet"};
};
extern Values values;