mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 10:40:39 +00:00
(menu_displaylist) Add SL_FLAG_ALLOW_EMPTY_LIST
This commit is contained in:
parent
cee0f2bf46
commit
ad9f0c4021
@ -1425,6 +1425,7 @@ static void xmb_init_horizontal_list(menu_handle_t *menu, xmb_handle_t *xmb)
|
||||
info.menu_list = NULL;
|
||||
info.type = 0;
|
||||
info.type_default = MENU_FILE_PLAIN;
|
||||
info.flags = SL_FLAG_ALLOW_EMPTY_LIST;
|
||||
strlcpy(info.label, "content_collection_list", sizeof(info.label));
|
||||
strlcpy(info.path, settings->playlist_directory, sizeof(info.path));
|
||||
strlcpy(info.exts, "lpl", sizeof(info.exts));
|
||||
|
@ -1602,14 +1602,18 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n
|
||||
|
||||
dir_list_sort(str_list, true);
|
||||
|
||||
|
||||
list_size = str_list->size;
|
||||
|
||||
if (list_size <= 0)
|
||||
{
|
||||
menu_list_push(info->list,
|
||||
"No items.", "", 0, 0);
|
||||
if (!(info->flags & SL_FLAG_ALLOW_EMPTY_LIST))
|
||||
{
|
||||
menu_list_push(info->list,
|
||||
"No items.", "", 0, 0);
|
||||
}
|
||||
|
||||
string_list_free(str_list);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -98,6 +98,7 @@ enum setting_list_flags
|
||||
SL_FLAG_LOGGING_OPTIONS = (1 << 25),
|
||||
SL_FLAG_SAVING_OPTIONS = (1 << 26),
|
||||
SL_FLAG_ALL = (1 << 27),
|
||||
SL_FLAG_ALLOW_EMPTY_LIST = (1 << 28)
|
||||
};
|
||||
|
||||
#define SL_FLAG_ALL_SETTINGS (SL_FLAG_ALL - SL_FLAG_MAIN_MENU)
|
||||
|
Loading…
Reference in New Issue
Block a user