Works correctly now with core collection

This commit is contained in:
twinaphex 2015-05-23 00:44:58 +02:00
parent 30aaa265e0
commit 1fd8220f61
4 changed files with 26 additions and 4 deletions

View File

@ -747,6 +747,7 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
if (!strcmp(path_playlist, "collection"))
{
menu_list_set_alt_at_offset(info->list, i, path);
menu_list_set_alt2_at_offset(info->list, i, info->path);
}
menu_list_push(info->list, fill_buf, path_playlist,
@ -1923,10 +1924,9 @@ static int menu_displaylist_parse(menu_displaylist_info_t *info,
fill_pathname_join(path_playlist,
settings->playlist_directory, info->path,
sizeof(path_playlist));
playlist = content_playlist_init(path_playlist,
menu->db_playlist = content_playlist_init(path_playlist,
999);
if (playlist)
free_list = true;
playlist = menu->db_playlist;
strlcpy(path_playlist, "collection", sizeof(path_playlist));
break;
default:

View File

@ -55,11 +55,15 @@ static int action_ok_rdb_playlist_entry(const char *path,
static int action_ok_playlist_entry(const char *path,
const char *label, unsigned type, size_t idx)
{
content_playlist_t *playlist = g_defaults.history;
menu_handle_t *menu = menu_driver_get_ptr();
if (!menu)
return -1;
rarch_playlist_load_content(g_defaults.history,
if (!strcmp(label, "collection"))
playlist = menu->db_playlist;
rarch_playlist_load_content(playlist,
menu->navigation.selection_ptr);
menu_list_flush_stack(menu->menu_list, NULL, MENU_SETTINGS);
return -1;

View File

@ -353,6 +353,18 @@ void menu_list_set_alt_at_offset(file_list_t *list, size_t idx,
file_list_set_alt_at_offset(list, idx, alt);
}
void menu_list_set_alt2_at_offset(file_list_t *list, size_t idx,
const char *alt)
{
file_list_set_alt2_at_offset(list, idx, alt);
}
void menu_list_get_alt2_at_offset(const file_list_t *list, size_t idx,
const char **alt)
{
file_list_get_alt2_at_offset(list, idx, alt);
}
void menu_list_get_alt_at_offset(const file_list_t *list, size_t idx,
const char **alt)
{

View File

@ -102,9 +102,15 @@ void menu_list_push(file_list_t *list,
void menu_list_get_alt_at_offset(const file_list_t *list, size_t idx,
const char **alt);
void menu_list_get_alt2_at_offset(const file_list_t *list, size_t idx,
const char **alt);
void menu_list_set_alt_at_offset(file_list_t *list, size_t idx,
const char *alt);
void menu_list_set_alt2_at_offset(file_list_t *list, size_t idx,
const char *alt);
void menu_list_refresh(file_list_t *list);
#ifdef __cplusplus