diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 028abdbae2..ccf984243c 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -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) { diff --git a/menu/menu_content.c b/menu/menu_content.c index 9c7485c105..e869e2f0f1 100644 --- a/menu/menu_content.c +++ b/menu/menu_content.c @@ -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; -} diff --git a/menu/menu_content.h b/menu/menu_content.h index 2123d444ce..c2bfb847ae 100644 --- a/menu/menu_content.h +++ b/menu/menu_content.h @@ -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