mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-04 10:36:50 +00:00
Create RARCH_MENU_CTL_LIST_PUSH
This commit is contained in:
parent
c9ec688a7e
commit
859a04e6ee
@ -2532,19 +2532,23 @@ static void menu_displaylist_parse_playlist_associations(menu_displaylist_info_t
|
||||
int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
{
|
||||
size_t i;
|
||||
menu_ctx_displaylist_t disp_list;
|
||||
int ret = 0;
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
struct video_shader *shader = NULL;
|
||||
#endif
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *system = NULL;
|
||||
core_info_list_t *list = NULL;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
core_info_ctl(CORE_INFO_CTL_LIST_GET, &list);
|
||||
core_info_ctl(CORE_INFO_CTL_LIST_GET, &list);
|
||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
||||
|
||||
if (menu_driver_list_push(info, type))
|
||||
disp_list.info = info;
|
||||
disp_list.type = type;
|
||||
|
||||
if (menu_driver_ctl(RARCH_MENU_CTL_LIST_PUSH, &disp_list))
|
||||
return 0;
|
||||
|
||||
switch (type)
|
||||
|
@ -256,15 +256,6 @@ size_t menu_driver_list_get_selection(void)
|
||||
return menu_driver_ctx->list_get_selection(menu_userdata);
|
||||
}
|
||||
|
||||
bool menu_driver_list_push(menu_displaylist_info_t *info, unsigned type)
|
||||
{
|
||||
if (menu_driver_ctx->list_push)
|
||||
if (menu_driver_ctx->list_push(menu_driver_data,
|
||||
menu_userdata, info, type) == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t menu_driver_list_get_size(menu_list_type_t type)
|
||||
{
|
||||
if (!menu_driver_ctx || !menu_driver_ctx->list_get_size)
|
||||
@ -706,6 +697,16 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
info->label, info->type);
|
||||
}
|
||||
break;
|
||||
case RARCH_MENU_CTL_LIST_PUSH:
|
||||
{
|
||||
menu_ctx_displaylist_t *disp_list = (menu_ctx_displaylist_t*)data;
|
||||
|
||||
if (menu_driver_ctx->list_push)
|
||||
if (menu_driver_ctx->list_push(menu_driver_data,
|
||||
menu_userdata, disp_list->info, disp_list->type) == 0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
case RARCH_MENU_CTL_LIST_CLEAR:
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
|
@ -145,17 +145,18 @@ enum rarch_menu_ctl_state
|
||||
RARCH_MENU_CTL_PLAYLIST_FREE,
|
||||
RARCH_MENU_CTL_PLAYLIST_INIT,
|
||||
RARCH_MENU_CTL_PLAYLIST_GET,
|
||||
RARCH_MENU_CTL_LIST_CLEAR,
|
||||
RARCH_MENU_CTL_TOGGLE,
|
||||
RARCH_MENU_CTL_CONTEXT_RESET,
|
||||
RARCH_MENU_CTL_CONTEXT_DESTROY,
|
||||
RARCH_MENU_CTL_SHADER_MANAGER_INIT,
|
||||
RARCH_MENU_CTL_LIST_SET_SELECTION,
|
||||
RARCH_MENU_CTL_POPULATE_ENTRIES,
|
||||
RARCH_MENU_CTL_FIND_DRIVER,
|
||||
RARCH_MENU_CTL_LOAD_IMAGE,
|
||||
RARCH_MENU_CTL_LIST_CLEAR,
|
||||
RARCH_MENU_CTL_LIST_SET_SELECTION,
|
||||
RARCH_MENU_CTL_LIST_CACHE,
|
||||
RARCH_MENU_CTL_LIST_INSERT,
|
||||
RARCH_MENU_CTL_LIST_PUSH,
|
||||
RARCH_MENU_CTL_ITERATE,
|
||||
RARCH_MENU_CTL_ENVIRONMENT
|
||||
};
|
||||
@ -350,6 +351,12 @@ typedef struct menu_ctx_list
|
||||
unsigned action;
|
||||
} menu_ctx_list_t;
|
||||
|
||||
typedef struct menu_ctx_displaylist
|
||||
{
|
||||
menu_displaylist_info_t *info;
|
||||
unsigned type;
|
||||
} menu_ctx_displaylist_t;
|
||||
|
||||
typedef struct menu_ctx_iterate
|
||||
{
|
||||
enum menu_action action;
|
||||
@ -398,7 +405,6 @@ size_t menu_driver_list_get_size(menu_list_type_t type);
|
||||
|
||||
void *menu_driver_list_get_entry(menu_list_type_t type, unsigned i);
|
||||
|
||||
bool menu_driver_list_push(menu_displaylist_info_t *info, unsigned type);
|
||||
|
||||
size_t menu_driver_list_get_selection(void);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user