mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-13 22:08:34 +00:00
Create menu_content_load_from_playlist
This commit is contained in:
parent
0e5e45595e
commit
5ddec4efc2
@ -656,7 +656,7 @@ static int action_ok_playlist_entry_collection(const char *path,
|
||||
playlist_info.data = playlist;
|
||||
playlist_info.idx = selection_ptr;
|
||||
|
||||
menu_content_ctl(MENU_CONTENT_CTL_LOAD_PLAYLIST, &playlist_info);
|
||||
menu_content_load_from_playlist(&playlist_info);
|
||||
|
||||
if (is_history)
|
||||
{
|
||||
@ -774,7 +774,7 @@ static int action_ok_playlist_entry(const char *path,
|
||||
playlist_info.data = playlist;
|
||||
playlist_info.idx = selection_ptr;
|
||||
|
||||
menu_content_ctl(MENU_CONTENT_CTL_LOAD_PLAYLIST, &playlist_info);
|
||||
menu_content_load_from_playlist(&playlist_info);
|
||||
|
||||
if (is_history)
|
||||
{
|
||||
|
@ -45,7 +45,7 @@
|
||||
*
|
||||
* Initializes core and loads content based on playlist entry.
|
||||
**/
|
||||
static bool menu_content_load_from_playlist(menu_content_ctx_playlist_info_t *info)
|
||||
bool menu_content_load_from_playlist(menu_content_ctx_playlist_info_t *info)
|
||||
{
|
||||
unsigned idx;
|
||||
playlist_t *playlist = NULL;
|
||||
@ -190,17 +190,3 @@ bool menu_content_find_first_core(menu_content_ctx_defer_info_t *def_info,
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool menu_content_ctl(enum menu_content_ctl_state state, void *data)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case MENU_CONTENT_CTL_LOAD_PLAYLIST:
|
||||
return menu_content_load_from_playlist((menu_content_ctx_playlist_info_t*)data);
|
||||
case MENU_CONTENT_CTL_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -24,26 +24,6 @@
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum menu_content_ctl_state
|
||||
{
|
||||
MENU_CONTENT_CTL_NONE = 0,
|
||||
|
||||
/* Initializes core and loads content
|
||||
* (based on playlist entry). */
|
||||
MENU_CONTENT_CTL_LOAD_PLAYLIST,
|
||||
|
||||
/* Find first core that is compatible with the
|
||||
* content.
|
||||
*
|
||||
* Returns false if there are multiple compatible
|
||||
* cores and a selection needs to be made from
|
||||
* a list.
|
||||
*
|
||||
* Returns true and fills in @s with path to core.
|
||||
*/
|
||||
MENU_CONTENT_CTL_FIND_FIRST_CORE
|
||||
};
|
||||
|
||||
typedef struct menu_content_ctx_playlist_info
|
||||
{
|
||||
void *data;
|
||||
@ -60,11 +40,18 @@ typedef struct menu_content_ctx_defer_info
|
||||
size_t len;
|
||||
} menu_content_ctx_defer_info_t;
|
||||
|
||||
/**
|
||||
* menu_content_load_from_playlist:
|
||||
* @playlist : Playlist handle.
|
||||
* @idx : Index in playlist.
|
||||
*
|
||||
* Initializes core and loads content based on playlist entry.
|
||||
**/
|
||||
bool menu_content_load_from_playlist(menu_content_ctx_playlist_info_t *info);
|
||||
|
||||
bool menu_content_find_first_core(menu_content_ctx_defer_info_t *def_info, bool load_content_with_current_core,
|
||||
char *new_core_path, size_t len);
|
||||
|
||||
bool menu_content_ctl(enum menu_content_ctl_state state, void *data);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user