(Privacy screen)Only show 'no settings available' when one of the two entries

fails
This commit is contained in:
twinaphex 2016-07-15 00:22:18 +02:00
parent d38e8544b8
commit 5d678a626f

View File

@ -4595,12 +4595,18 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
info->need_push = true;
break;
case DISPLAYLIST_PRIVACY_SETTINGS_LIST:
menu_displaylist_parse_settings_enum(menu, info,
{
bool available = false;
if (menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_CAMERA_ALLOW,
PARSE_ONLY_BOOL, false);
PARSE_ONLY_BOOL, false) == 0)
available = true;
if (menu_displaylist_parse_settings_enum(menu, info,
MENU_ENUM_LABEL_LOCATION_ALLOW,
PARSE_ONLY_BOOL, true) == -1)
PARSE_ONLY_BOOL, true) == 0)
available = true;
if (!available)
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND),
msg_hash_to_str(MENU_ENUM_LABEL_NO_SETTINGS_FOUND),
@ -4609,6 +4615,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
info->need_refresh = true;
info->need_push = true;
}
break;
case DISPLAYLIST_VIDEO_SETTINGS_LIST:
menu_displaylist_parse_settings_enum(menu, info,