menu_displaylist_parse_horizontal_list - cleanups
This commit is contained in:
parent
6d4b5a93ea
commit
f80d701ca7
|
@ -2477,16 +2477,12 @@ static int menu_displaylist_parse_horizontal_list(
|
||||||
{
|
{
|
||||||
menu_ctx_list_t list_info;
|
menu_ctx_list_t list_info;
|
||||||
menu_ctx_list_t list_horiz_info;
|
menu_ctx_list_t list_horiz_info;
|
||||||
char lpl_basename[PATH_MAX_LENGTH];
|
|
||||||
char path_playlist[PATH_MAX_LENGTH];
|
|
||||||
bool is_historylist = false;
|
bool is_historylist = false;
|
||||||
playlist_t *playlist = NULL;
|
playlist_t *playlist = NULL;
|
||||||
menu_handle_t *menu = NULL;
|
menu_handle_t *menu = NULL;
|
||||||
struct item_file *item = NULL;
|
struct item_file *item = NULL;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
lpl_basename[0] = path_playlist[0] = '\0';
|
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_LIST_GET_SELECTION, &list_info);
|
menu_driver_ctl(RARCH_MENU_CTL_LIST_GET_SELECTION, &list_info);
|
||||||
|
|
||||||
list_info.type = MENU_LIST_TABS;
|
list_info.type = MENU_LIST_TABS;
|
||||||
|
@ -2505,31 +2501,32 @@ static int menu_displaylist_parse_horizontal_list(
|
||||||
if (!item)
|
if (!item)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
fill_pathname_base_noext(lpl_basename, item->path, sizeof(lpl_basename));
|
if (!string_is_empty(item->path))
|
||||||
|
{
|
||||||
|
char path_playlist[PATH_MAX_LENGTH];
|
||||||
|
char lpl_basename[PATH_MAX_LENGTH];
|
||||||
|
lpl_basename[0] = '\0';
|
||||||
|
path_playlist[0] = '\0';
|
||||||
|
|
||||||
fill_pathname_join(
|
fill_pathname_base_noext(lpl_basename, item->path, sizeof(lpl_basename));
|
||||||
path_playlist,
|
menu_driver_set_thumbnail_system(lpl_basename, sizeof(lpl_basename));
|
||||||
settings->paths.directory_playlist,
|
if (string_is_equal(lpl_basename, "content_history"))
|
||||||
item->path,
|
is_historylist = true;
|
||||||
sizeof(path_playlist));
|
|
||||||
|
|
||||||
menu_driver_set_thumbnail_system(lpl_basename, sizeof(lpl_basename));
|
fill_pathname_join(
|
||||||
|
path_playlist,
|
||||||
menu_displaylist_set_new_playlist(menu, path_playlist);
|
settings->paths.directory_playlist,
|
||||||
|
item->path,
|
||||||
strlcpy(path_playlist,
|
sizeof(path_playlist));
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_COLLECTION),
|
menu_displaylist_set_new_playlist(menu, path_playlist);
|
||||||
sizeof(path_playlist));
|
}
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &playlist);
|
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &playlist);
|
||||||
|
|
||||||
playlist_qsort(playlist);
|
playlist_qsort(playlist);
|
||||||
|
|
||||||
if (string_is_equal(lpl_basename, "content_history"))
|
|
||||||
is_historylist = true;
|
|
||||||
|
|
||||||
menu_displaylist_parse_playlist(info,
|
menu_displaylist_parse_playlist(info,
|
||||||
playlist, path_playlist, is_historylist);
|
playlist, msg_hash_to_str(MENU_ENUM_LABEL_COLLECTION), is_historylist);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue