(Menu) Selectively hide 'FPS Update Interval'

This commit is contained in:
twinaphex 2019-12-21 05:22:18 +01:00
parent f5a7504c38
commit aafee65238
2 changed files with 7 additions and 1 deletions

View File

@ -6048,7 +6048,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_VIDEO_FONT_ENABLE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_FPS_SHOW, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL, PARSE_ONLY_UINT, true },
{MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL, PARSE_ONLY_UINT, false },
{MENU_ENUM_LABEL_FRAMECOUNT_SHOW, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_STATISTICS_SHOW, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_MEMORY_SHOW, PARSE_ONLY_BOOL, true },
@ -6070,6 +6070,10 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{
switch (build_list[i].enum_idx)
{
case MENU_ENUM_LABEL_FPS_UPDATE_INTERVAL:
if (settings->bools.video_fps_show)
build_list[i].checked = true;
break;
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_RED:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_GREEN:
case MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_BLUE:

View File

@ -9255,6 +9255,8 @@ static bool setting_append_list(
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
(*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;
CONFIG_UINT(
list, list_info,