From 7e8ea3f6fb6f514a61b47f38588da55035594fdf Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 6 Feb 2016 21:34:54 +0100 Subject: [PATCH] Add better fallback for 'no items found' --- menu/menu_displaylist.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 0419d5b1c0..82aceb346d 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2393,21 +2393,21 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool ho string_list_free(str_list); + if (items_found == 0) + { + if (!(info->flags & SL_FLAG_ALLOW_EMPTY_LIST)) + { + menu_entries_push(info->list, + menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS), + "", MENU_SETTING_NO_ITEM, 0, 0); + } + + return 0; + } + switch (hash_label) { case MENU_LABEL_CORE_LIST: - if (items_found == 0) - { - if (!(info->flags & SL_FLAG_ALLOW_EMPTY_LIST)) - { - menu_entries_push(info->list, - menu_hash_to_str(MENU_LABEL_VALUE_NO_ITEMS), - "", MENU_SETTING_NO_ITEM, 0, 0); - } - - return 0; - } - { const char *dir = NULL;