Add menu_driver_push_list

This commit is contained in:
twinaphex 2017-05-15 08:29:47 +02:00
parent 575095c8e6
commit d28ec842f3
3 changed files with 12 additions and 12 deletions

View File

@ -4093,7 +4093,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
disp_list.info = info;
disp_list.type = type;
if (menu_driver_ctl(RARCH_MENU_CTL_LIST_PUSH, &disp_list))
if (menu_driver_push_list(&disp_list))
return true;
switch (type)

View File

@ -527,6 +527,15 @@ bool menu_driver_load_image(menu_ctx_load_image_t *load_image_info)
return false;
}
bool menu_driver_push_list(menu_ctx_displaylist_t *disp_list)
{
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;
}
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
{
switch (state)
@ -800,16 +809,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
}
}
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_REFRESH:
{
#if 0

View File

@ -117,7 +117,6 @@ enum rarch_menu_ctl_state
RARCH_MENU_CTL_LIST_GET_ENTRY,
RARCH_MENU_CTL_LIST_CACHE,
RARCH_MENU_CTL_LIST_INSERT,
RARCH_MENU_CTL_LIST_PUSH,
RARCH_MENU_CTL_ENVIRONMENT,
RARCH_MENU_CTL_DRIVER_DATA_GET,
RARCH_MENU_CTL_POINTER_TAP,
@ -402,6 +401,8 @@ void menu_driver_populate_entries(menu_displaylist_info_t *info);
bool menu_driver_load_image(menu_ctx_load_image_t *load_image_info);
bool menu_driver_push_list(menu_ctx_displaylist_t *disp_list);
bool menu_driver_init(bool video_is_threaded);
extern menu_ctx_driver_t menu_ctx_xui;