From a2e5ccc2c6e449cff2dd15ae81e871f699a73275 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 16 Jan 2015 16:15:58 +0100 Subject: [PATCH] Add UI Options --- settings_data.c | 75 ++++++++++++++++++++++++++++++++----------------- settings_list.h | 17 +++++------ 2 files changed, 58 insertions(+), 34 deletions(-) diff --git a/settings_data.c b/settings_data.c index bbe012f19f..173adceacf 100644 --- a/settings_data.c +++ b/settings_data.c @@ -3793,32 +3793,6 @@ static bool setting_data_append_list_general_options( settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO); #endif - CONFIG_BOOL( - g_settings.video.disable_composition, - "video_disable_composition", - "Window Compositing Disable", - disable_composition, - "OFF", - "ON", - group_info.name, - subgroup_info.name, - general_write_handler, - general_read_handler); - settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT); - settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO); - - CONFIG_BOOL( - g_settings.pause_nonactive, - "pause_nonactive", - "Window Unfocus Pause", - pause_nonactive, - "OFF", - "ON", - group_info.name, - subgroup_info.name, - general_write_handler, - general_read_handler); - CONFIG_BOOL( g_settings.fastforward_ratio_throttle_enable, "fastforward_ratio_throttle_enable", @@ -5339,6 +5313,49 @@ static bool setting_data_append_list_menu_options( return true; } +static bool setting_data_append_list_ui_options( + rarch_setting_t **list, + rarch_setting_info_t *list_info) +{ + rarch_setting_group_info_t group_info; + rarch_setting_group_info_t subgroup_info; + + START_GROUP(group_info, "UI Options"); + START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info); + + CONFIG_BOOL( + g_settings.video.disable_composition, + "video_disable_composition", + "Window Compositing Disable", + disable_composition, + "OFF", + "ON", + group_info.name, + subgroup_info.name, + general_write_handler, + general_read_handler); + settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT); + settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO); + + CONFIG_BOOL( + g_settings.pause_nonactive, + "pause_nonactive", + "Window Unfocus Pause", + pause_nonactive, + "OFF", + "ON", + group_info.name, + subgroup_info.name, + general_write_handler, + general_read_handler); + + END_SUB_GROUP(list, list_info); + + END_GROUP(list, list_info); + + return true; +} + static bool setting_data_append_list_archive_options( rarch_setting_t **list, rarch_setting_info_t *list_info) @@ -6095,6 +6112,12 @@ rarch_setting_t *setting_data_new(unsigned mask) goto error; } + if (mask & SL_FLAG_UI_OPTIONS) + { + if (!setting_data_append_list_ui_options(&list, list_info)) + goto error; + } + if (mask & SL_FLAG_PATCH_OPTIONS) { if (!setting_data_append_list_patch_options(&list, list_info)) diff --git a/settings_list.h b/settings_list.h index 9b6ff85dd5..04c39b0958 100644 --- a/settings_list.h +++ b/settings_list.h @@ -71,14 +71,15 @@ enum setting_list_flags SL_FLAG_INPUT_OPTIONS = (1 << 7), SL_FLAG_OVERLAY_OPTIONS = (1 << 8), SL_FLAG_MENU_OPTIONS = (1 << 9), - SL_FLAG_NETPLAY_OPTIONS = (1 << 10), - SL_FLAG_USER_OPTIONS = (1 << 11), - SL_FLAG_PATH_OPTIONS = (1 << 12), - SL_FLAG_PRIVACY_OPTIONS = (1 << 13), - SL_FLAG_PLAYLIST_OPTIONS = (1 << 14), - SL_FLAG_ARCHIVE_OPTIONS = (1 << 15), - SL_FLAG_PATCH_OPTIONS = (1 << 16), - SL_FLAG_ALL = (1 << 17), + SL_FLAG_UI_OPTIONS = (1 << 10), + SL_FLAG_NETPLAY_OPTIONS = (1 << 11), + SL_FLAG_USER_OPTIONS = (1 << 12), + SL_FLAG_PATH_OPTIONS = (1 << 13), + SL_FLAG_PRIVACY_OPTIONS = (1 << 14), + SL_FLAG_PLAYLIST_OPTIONS = (1 << 15), + SL_FLAG_ARCHIVE_OPTIONS = (1 << 16), + SL_FLAG_PATCH_OPTIONS = (1 << 17), + SL_FLAG_ALL = (1 << 18), }; #define SL_FLAG_ALL_SETTINGS (SL_FLAG_ALL - SL_FLAG_MAIN_MENU)