Create separate 'Core settings'

This commit is contained in:
twinaphex 2016-06-18 22:17:39 +02:00
parent f4772f07f3
commit 442ebf2acf
9 changed files with 85 additions and 3 deletions

View File

@ -104,6 +104,11 @@ static int deferred_push_driver_settings_list(menu_displaylist_info_t *info)
return deferred_push_dlist(info, DISPLAYLIST_DRIVER_SETTINGS_LIST);
}
static int deferred_push_core_settings_list(menu_displaylist_info_t *info)
{
return deferred_push_dlist(info, DISPLAYLIST_CORE_SETTINGS_LIST);
}
static int deferred_push_video_settings_list(menu_displaylist_info_t *info)
{
return deferred_push_dlist(info, DISPLAYLIST_VIDEO_SETTINGS_LIST);
@ -598,6 +603,12 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
menu_file_list_cbs_t *cbs,
const char *label, uint32_t label_hash)
{
if (string_is_equal(label, menu_hash_to_str_enum(MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST)))
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_settings_list);
return 0;
}
if (strstr(label, menu_hash_to_str_enum(MENU_ENUM_LABEL_DEFERRED_RDB_ENTRY_DETAIL)))
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_rdb_entry_detail);
@ -825,6 +836,9 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
case MENU_ENUM_LABEL_DEFERRED_AUDIO_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_audio_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_settings_list);
break;
case MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
case MENU_ENUM_LABEL_DETECT_CORE_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_detect_core_list);

View File

@ -446,6 +446,13 @@ int generic_action_ok_displaylist_push(const char *path,
info_label = menu_hash_to_str_enum(MENU_ENUM_LABEL_DEFERRED_DRIVER_SETTINGS_LIST);
info.enum_idx = MENU_ENUM_LABEL_DEFERRED_DRIVER_SETTINGS_LIST;
break;
case ACTION_OK_DL_CORE_SETTINGS_LIST:
info.directory_ptr = idx;
info.type = type;
info_path = path;
info_label = menu_hash_to_str_enum(MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST);
info.enum_idx = MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST;
break;
case ACTION_OK_DL_VIDEO_SETTINGS_LIST:
info.directory_ptr = idx;
info.type = type;
@ -2340,6 +2347,13 @@ static int action_ok_push_video_settings_list(const char *path,
ACTION_OK_DL_VIDEO_SETTINGS_LIST);
}
static int action_ok_push_core_settings_list(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
return generic_action_ok_displaylist_push(path, label, 0, 0, entry_idx,
ACTION_OK_DL_CORE_SETTINGS_LIST);
}
static int action_ok_push_audio_settings_list(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx)
{
@ -2726,6 +2740,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_AUDIO_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_audio_settings_list);
break;
case MENU_ENUM_LABEL_CORE_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_core_settings_list);
break;
case MENU_ENUM_LABEL_PLAYLIST_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_playlist_settings_list);
break;

View File

@ -454,6 +454,13 @@ static int action_get_driver_settings_list(const char *path, const char *label,
return 0;
}
static int action_get_core_settings_list(const char *path, const char *label,
unsigned menu_type, char *s, size_t len)
{
sanitize_to_string(s, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_SETTINGS), len);
return 0;
}
static int action_get_video_settings_list(const char *path, const char *label,
unsigned menu_type, char *s, size_t len)
{
@ -717,6 +724,12 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
}
}
if (string_is_equal(label, menu_hash_to_str_enum(MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST)))
{
BIND_ACTION_GET_TITLE(cbs, action_get_core_settings_list);
return 0;
}
if (cbs->enum_idx != MENU_ENUM_LABEL_UNKNOWN)
{
switch (cbs->enum_idx)
@ -925,6 +938,9 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_video_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_core_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_AUDIO_SETTINGS_LIST:
BIND_ACTION_GET_TITLE(cbs, action_get_audio_settings_list);
break;

View File

@ -26,6 +26,8 @@ static const char *menu_hash_to_str_us_label_enum(enum menu_hash_enums msg)
{
switch (msg)
{
case MENU_ENUM_LABEL_CORE_SETTINGS:
return "core_settings";
case MENU_ENUM_LABEL_CB_MENU_WALLPAPER:
return "cb_menu_wallpaper";
case MENU_ENUM_LABEL_CB_LAKKA_LIST:
@ -188,6 +190,8 @@ static const char *menu_hash_to_str_us_label_enum(enum menu_hash_enums msg)
return "deferred_driver_settings_list";
case MENU_ENUM_LABEL_DEFERRED_AUDIO_SETTINGS_LIST:
return "deferred_audio_settings_list";
case MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST:
return "deferred_core_settings_list";
case MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST:
return "deferred_video_settings_list";
case MENU_ENUM_LABEL_ACCOUNTS_LIST:

View File

@ -43,6 +43,7 @@ enum
ACTION_OK_DL_DRIVER_SETTINGS_LIST,
ACTION_OK_DL_VIDEO_SETTINGS_LIST,
ACTION_OK_DL_AUDIO_SETTINGS_LIST,
ACTION_OK_DL_CORE_SETTINGS_LIST,
ACTION_OK_DL_INPUT_HOTKEY_BINDS_LIST,
ACTION_OK_DL_PLAYLIST_SETTINGS_LIST,
ACTION_OK_DL_ACCOUNTS_LIST,

View File

@ -3702,6 +3702,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
case DISPLAYLIST_DRIVER_SETTINGS_LIST:
case DISPLAYLIST_VIDEO_SETTINGS_LIST:
case DISPLAYLIST_AUDIO_SETTINGS_LIST:
case DISPLAYLIST_CORE_SETTINGS_LIST:
case DISPLAYLIST_INPUT_SETTINGS_LIST:
case DISPLAYLIST_PLAYLIST_SETTINGS_LIST:
case DISPLAYLIST_AUDIO_FILTERS:
@ -4093,6 +4094,20 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
MENU_ENUM_LABEL_VIDEO_FILTER,
PARSE_ONLY_PATH, false);
info->need_refresh = true;
info->need_push = true;
break;
case DISPLAYLIST_CORE_SETTINGS_LIST:
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_VIDEO_SHARED_CONTEXT,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_DUMMY_ON_CORE_SHUTDOWN,
PARSE_ONLY_BOOL, false);
menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE,
PARSE_ONLY_BOOL, false);
info->need_refresh = true;
info->need_push = true;
break;
@ -4196,15 +4211,15 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
break;
case DISPLAYLIST_SETTINGS_ALL:
ret = menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_DRIVER_SETTINGS, PARSE_ACTION, false);
MENU_ENUM_LABEL_DRIVER_SETTINGS, PARSE_ACTION, false);
ret = menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_VIDEO_SETTINGS, PARSE_ACTION, false);
ret = menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_AUDIO_SETTINGS, PARSE_ACTION, false);
ret = menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_INPUT_SETTINGS, PARSE_ACTION, false);
ret = menu_displaylist_parse_settings(menu, info,
menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_SETTINGS), PARSE_ONLY_GROUP, false);
ret = menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_CORE_SETTINGS, PARSE_ACTION, false);
ret = menu_displaylist_parse_settings(menu, info,
menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS), PARSE_ONLY_GROUP, false);
ret = menu_displaylist_parse_settings(menu, info,

View File

@ -103,6 +103,7 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_DRIVER_SETTINGS_LIST,
DISPLAYLIST_VIDEO_SETTINGS_LIST,
DISPLAYLIST_AUDIO_SETTINGS_LIST,
DISPLAYLIST_CORE_SETTINGS_LIST,
DISPLAYLIST_INPUT_SETTINGS_LIST,
DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST,
DISPLAYLIST_PLAYLIST_SETTINGS_LIST,

View File

@ -423,6 +423,7 @@ enum menu_hash_enums
MENU_ENUM_LABEL_DEFERRED_DRIVER_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_AUDIO_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_USER_BINDS_LIST,
MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_CHEEVOS_LIST,
MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_LIST,
@ -1038,11 +1039,13 @@ enum menu_hash_enums
MENU_ENUM_LABEL_DRIVER_SETTINGS,
MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS,
MENU_ENUM_LABEL_VIDEO_SETTINGS,
MENU_ENUM_LABEL_AUDIO_SETTINGS,
MENU_ENUM_LABEL_VALUE_AUDIO_SETTINGS,
MENU_ENUM_LABEL_CORE_SETTINGS,
MENU_ENUM_LABEL_VALUE_CORE_SETTINGS,
MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS,
MENU_ENUM_LABEL_VALUE_LOGGING_SETTINGS,

View File

@ -4197,6 +4197,15 @@ static bool setting_append_list(
parent_group);
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_INPUT_SETTINGS);
CONFIG_ACTION(
list, list_info,
menu_hash_to_str_enum(MENU_ENUM_LABEL_CORE_SETTINGS),
menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_SETTINGS),
&group_info,
&subgroup_info,
parent_group);
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_CORE_SETTINGS);
CONFIG_ACTION(
list, list_info,
menu_hash_to_str_enum(MENU_ENUM_LABEL_PLAYLIST_SETTINGS),
@ -4388,6 +4397,8 @@ static bool setting_append_list(
break;
case SETTINGS_LIST_CORE:
START_GROUP(list, list_info, &group_info, menu_hash_to_str_enum(MENU_ENUM_LABEL_VALUE_CORE_SETTINGS), parent_group);
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_CORE_SETTINGS);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
parent_group = menu_hash_to_str_enum(MENU_ENUM_LABEL_SETTINGS);