From aafee652389c057774b8bdf11bd22839911e750c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 21 Dec 2019 05:22:18 +0100 Subject: [PATCH] (Menu) Selectively hide 'FPS Update Interval' --- menu/menu_displaylist.c | 6 +++++- menu/menu_setting.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 2a02eace85..1fae211919 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -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: diff --git a/menu/menu_setting.c b/menu/menu_setting.c index a12bd0c918..17e7d50962 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -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,