Properly hide other notification visibility screenshot settings

when master one is disabled
This commit is contained in:
twinaphex 2020-07-20 01:09:08 +02:00
parent 6cba44328d
commit 279e142668
2 changed files with 14 additions and 4 deletions

View File

@ -7553,6 +7553,9 @@ unsigned menu_displaylist_build_list(
#ifdef HAVE_GFX_WIDGETS
bool widgets_supported = video_driver_has_widgets();
bool menu_enable_widgets = settings->bools.menu_enable_widgets;
#endif
#ifdef HAVE_SCREENSHOTS
bool notification_show_screenshot = settings->bools.notification_show_screenshot;
#endif
menu_displaylist_build_info_selective_t build_list[] = {
{MENU_ENUM_LABEL_FPS_SHOW, PARSE_ONLY_BOOL, true },
@ -7600,14 +7603,18 @@ unsigned menu_displaylist_build_list(
case MENU_ENUM_LABEL_NOTIFICATION_SHOW_SCREENSHOT_DURATION:
#ifdef HAVE_SCREENSHOTS
if ( widgets_supported &&
menu_enable_widgets)
menu_enable_widgets &&
notification_show_screenshot
)
build_list[i].checked = true;
#endif
break;
case MENU_ENUM_LABEL_NOTIFICATION_SHOW_SCREENSHOT_FLASH:
#ifdef HAVE_SCREENSHOTS
if ( widgets_supported &&
menu_enable_widgets)
menu_enable_widgets &&
notification_show_screenshot
)
build_list[i].checked = true;
#endif
break;

View File

@ -12720,6 +12720,9 @@ static bool setting_append_list(
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
(*list)[list_info->index - 1].action_ok = &setting_bool_action_left_with_refresh;
(*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,