mirror of
https://github.com/libretro/RetroArch
synced 2025-01-15 23:02:24 +00:00
(Menu) Get Remove from Playlist to work on history playlists
This commit is contained in:
parent
25a2b64f1c
commit
f06e76301e
@ -2544,6 +2544,15 @@ static int action_ok_delete_entry(const char *path,
|
|||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &playlist);
|
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);
|
playlist_delete_index(playlist, rpl_entry_selection_ptr);
|
||||||
|
|
||||||
size_t new_selection_ptr;
|
size_t new_selection_ptr;
|
||||||
|
19
playlist.c
19
playlist.c
@ -33,25 +33,6 @@
|
|||||||
#define PLAYLIST_ENTRIES 6
|
#define PLAYLIST_ENTRIES 6
|
||||||
#endif
|
#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)(
|
typedef int (playlist_sort_fun_t)(
|
||||||
const struct playlist_entry *a,
|
const struct playlist_entry *a,
|
||||||
const struct playlist_entry *b);
|
const struct playlist_entry *b);
|
||||||
|
19
playlist.h
19
playlist.h
@ -27,6 +27,25 @@ RETRO_BEGIN_DECLS
|
|||||||
|
|
||||||
typedef struct content_playlist playlist_t;
|
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:
|
* playlist_init:
|
||||||
* @path : Path to playlist contents file.
|
* @path : Path to playlist contents file.
|
||||||
|
Loading…
Reference in New Issue
Block a user