mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(Menu) Selectively hide 'Rewind' settings
This commit is contained in:
parent
aafee65238
commit
d93200d2eb
@ -6630,16 +6630,33 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
break;
|
||||
case DISPLAYLIST_REWIND_SETTINGS_LIST:
|
||||
{
|
||||
menu_displaylist_build_info_t build_list[] = {
|
||||
{MENU_ENUM_LABEL_REWIND_ENABLE, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_REWIND_GRANULARITY, PARSE_ONLY_UINT},
|
||||
{MENU_ENUM_LABEL_REWIND_BUFFER_SIZE, PARSE_ONLY_SIZE},
|
||||
{MENU_ENUM_LABEL_REWIND_BUFFER_SIZE_STEP, PARSE_ONLY_UINT},
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_displaylist_build_info_selective_t build_list[] = {
|
||||
{MENU_ENUM_LABEL_REWIND_ENABLE, PARSE_ONLY_BOOL, true},
|
||||
{MENU_ENUM_LABEL_REWIND_GRANULARITY, PARSE_ONLY_UINT, false},
|
||||
{MENU_ENUM_LABEL_REWIND_BUFFER_SIZE, PARSE_ONLY_SIZE, false},
|
||||
{MENU_ENUM_LABEL_REWIND_BUFFER_SIZE_STEP, PARSE_ONLY_UINT, false},
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
if (menu_displaylist_parse_settings_enum(list,
|
||||
switch (build_list[i].enum_idx)
|
||||
{
|
||||
case MENU_ENUM_LABEL_REWIND_GRANULARITY:
|
||||
case MENU_ENUM_LABEL_REWIND_BUFFER_SIZE:
|
||||
case MENU_ENUM_LABEL_REWIND_BUFFER_SIZE_STEP:
|
||||
if (settings->bools.rewind_enable)
|
||||
build_list[i].checked = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
{
|
||||
if (build_list[i].checked &&
|
||||
menu_displaylist_parse_settings_enum(list,
|
||||
build_list[i].enum_idx, build_list[i].parse_type,
|
||||
false) == 0)
|
||||
count++;
|
||||
|
@ -8732,6 +8732,8 @@ static bool setting_append_list(
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_CMD_APPLY_AUTO);
|
||||
(*list)[list_info->index - 1].action_left = &setting_bool_action_left_with_refresh;
|
||||
(*list)[list_info->index - 1].action_right = &setting_bool_action_right_with_refresh;
|
||||
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REWIND_TOGGLE);
|
||||
|
||||
CONFIG_UINT(
|
||||
|
Loading…
x
Reference in New Issue
Block a user