(Menu) Get Remove from Playlist to work on history playlists

This commit is contained in:
Jean-André Santoni 2016-08-29 02:22:05 +02:00
parent 25a2b64f1c
commit f06e76301e
3 changed files with 28 additions and 19 deletions

View File

@ -2544,6 +2544,15 @@ static int action_ok_delete_entry(const char *path,
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &playlist);
if (!strcmp(playlist->conf_path, g_defaults.music_history->conf_path))
playlist = g_defaults.music_history;
else if (!strcmp(playlist->conf_path, g_defaults.video_history->conf_path))
playlist = g_defaults.video_history;
else if (!strcmp(playlist->conf_path, g_defaults.image_history->conf_path))
playlist = g_defaults.image_history;
else if (!strcmp(playlist->conf_path, g_defaults.content_history->conf_path))
playlist = g_defaults.content_history;
playlist_delete_index(playlist, rpl_entry_selection_ptr);
size_t new_selection_ptr;

View File

@ -33,25 +33,6 @@
#define PLAYLIST_ENTRIES 6
#endif
struct playlist_entry
{
char *path;
char *label;
char *core_path;
char *core_name;
char *db_name;
char *crc32;
};
struct content_playlist
{
struct playlist_entry *entries;
size_t size;
size_t cap;
char *conf_path;
};
typedef int (playlist_sort_fun_t)(
const struct playlist_entry *a,
const struct playlist_entry *b);

View File

@ -27,6 +27,25 @@ RETRO_BEGIN_DECLS
typedef struct content_playlist playlist_t;
struct playlist_entry
{
char *path;
char *label;
char *core_path;
char *core_name;
char *db_name;
char *crc32;
};
struct content_playlist
{
struct playlist_entry *entries;
size_t size;
size_t cap;
char *conf_path;
};
/**
* playlist_init:
* @path : Path to playlist contents file.