mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-21 10:20:21 +00:00
(GLUI) Playlist tab works now
This commit is contained in:
parent
83441964d3
commit
ed1d8583f4
@ -1156,6 +1156,8 @@ static void glui_list_cache(menu_list_type_t type, unsigned action)
|
||||
MENU_SETTINGS;
|
||||
break;
|
||||
case GLUI_SYSTEM_TAB_PLAYLISTS:
|
||||
menu_stack->list[stack_size - 1].label =
|
||||
strdup(menu_hash_to_str(MENU_VALUE_PLAYLISTS_TAB));
|
||||
menu_stack->list[stack_size - 1].label =
|
||||
strdup(menu_hash_to_str(MENU_VALUE_PLAYLISTS_TAB));
|
||||
menu_stack->list[stack_size - 1].type =
|
||||
|
@ -3027,6 +3027,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
case DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL:
|
||||
{
|
||||
bool horizontal = (type == DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL);
|
||||
|
||||
if (menu_displaylist_parse_generic(info, horizontal) == 0)
|
||||
{
|
||||
info->need_refresh = true;
|
||||
@ -3074,6 +3075,7 @@ int menu_displaylist_push(file_list_t *list, file_list_t *menu_list)
|
||||
uint32_t hash_label = 0;
|
||||
unsigned type = 0;
|
||||
menu_displaylist_info_t info = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
menu_entries_get_last_stack(&path, &label, &type, NULL);
|
||||
|
||||
@ -3111,8 +3113,28 @@ int menu_displaylist_push(file_list_t *list, file_list_t *menu_list)
|
||||
menu_displaylist_push_list_process(&info);
|
||||
return 0;
|
||||
case MENU_VALUE_PLAYLISTS_TAB:
|
||||
if (menu_displaylist_push_list(&info, DISPLAYLIST_DATABASE_PLAYLISTS) != 0)
|
||||
return -1;
|
||||
info.type = 42;
|
||||
strlcpy(info.exts, "lpl", sizeof(info.exts));
|
||||
strlcpy(info.label, menu_hash_to_str(MENU_LABEL_CONTENT_COLLECTION_LIST),
|
||||
sizeof(info.label));
|
||||
|
||||
if (settings->playlist_directory[0] != '\0')
|
||||
{
|
||||
strlcpy(info.path, settings->playlist_directory,
|
||||
sizeof(info.path));
|
||||
if (menu_displaylist_push_list(&info, DISPLAYLIST_DATABASE_PLAYLISTS_HORIZONTAL) != 0)
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
menu_entries_clear(info.list);
|
||||
menu_entries_push(info.list,
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
||||
menu_hash_to_str(MENU_LABEL_NO_PLAYLIST_ENTRIES_AVAILABLE),
|
||||
MENU_INFO_MESSAGE, 0, 0);
|
||||
info.need_refresh = true;
|
||||
info.need_push = true;
|
||||
}
|
||||
menu_displaylist_push_list_process(&info);
|
||||
return 0;
|
||||
case MENU_VALUE_HORIZONTAL_MENU:
|
||||
|
Loading…
Reference in New Issue
Block a user