mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Create list_push callback - allows us to override lists
This commit is contained in:
parent
f48830cfc0
commit
14bf640bf6
@ -865,6 +865,7 @@ menu_ctx_driver_t menu_ctx_glui = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
glui_list_set_selection,
|
||||
NULL,
|
||||
glui_load_image,
|
||||
|
@ -47,6 +47,7 @@ menu_ctx_driver_t menu_ctx_null = {
|
||||
NULL, /* list_delete */
|
||||
NULL, /* list_clear */
|
||||
NULL, /* list_cache */
|
||||
NULL, /* list_push */
|
||||
NULL, /* list_get_selection */
|
||||
NULL, /* list_get_size */
|
||||
NULL, /* list_get_entry */
|
||||
|
@ -867,6 +867,7 @@ menu_ctx_driver_t menu_ctx_rgui = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"rgui",
|
||||
MENU_VIDEO_DRIVER_GENERIC,
|
||||
rgui_environ,
|
||||
|
@ -355,6 +355,7 @@ menu_ctx_driver_t menu_ctx_rmenu = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"rmenu",
|
||||
MENU_VIDEO_DRIVER_DIRECT3D,
|
||||
rmenu_environ,
|
||||
|
@ -2590,6 +2590,11 @@ static int xmb_list_bind_init(menu_file_list_cbs_t *cbs,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int xmb_list_push(menu_displaylist_info_t *info, unsigned type)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static bool xmb_menu_init_list(void *data)
|
||||
{
|
||||
int ret;
|
||||
@ -2638,6 +2643,7 @@ menu_ctx_driver_t menu_ctx_xmb = {
|
||||
xmb_list_free,
|
||||
xmb_list_clear,
|
||||
xmb_list_cache,
|
||||
xmb_list_push,
|
||||
xmb_list_get_selection,
|
||||
xmb_list_get_size,
|
||||
xmb_list_get_entry,
|
||||
|
@ -1244,6 +1244,7 @@ menu_ctx_driver_t menu_ctx_zarch = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
zarch_load_image,
|
||||
"zarch",
|
||||
MENU_VIDEO_DRIVER_OPENGL,
|
||||
|
@ -2188,6 +2188,9 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
struct video_shader *shader = video_shader_driver_get_current_shader();
|
||||
#endif
|
||||
|
||||
if (menu_driver_list_push(info, type))
|
||||
return 0;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DISPLAYLIST_HELP_SCREEN_LIST:
|
||||
|
@ -245,6 +245,16 @@ size_t menu_driver_list_get_selection(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool menu_driver_list_push(menu_displaylist_info_t *info, unsigned type)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
|
||||
if (driver->list_push)
|
||||
if (driver->list_push(info, type) == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void menu_driver_list_cache(menu_list_type_t type, unsigned action)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
|
@ -129,6 +129,7 @@ typedef struct menu_ctx_driver
|
||||
void (*list_free)(file_list_t *list, size_t, size_t);
|
||||
void (*list_clear)(file_list_t *list);
|
||||
void (*list_cache)(menu_list_type_t, unsigned);
|
||||
int (*list_push)(menu_displaylist_info_t*, unsigned);
|
||||
size_t(*list_get_selection)(void *data);
|
||||
size_t(*list_get_size)(void *data, menu_list_type_t type);
|
||||
void *(*list_get_entry)(void *data, menu_list_type_t type, unsigned i);
|
||||
@ -214,6 +215,8 @@ void menu_driver_context_destroy(void);
|
||||
|
||||
bool menu_driver_alive(void);
|
||||
|
||||
bool menu_driver_list_push(menu_displaylist_info_t *info, unsigned type);
|
||||
|
||||
size_t menu_driver_list_get_selection(void);
|
||||
|
||||
bool menu_environment_cb(menu_environ_cb_t type, void *data);
|
||||
|
Loading…
Reference in New Issue
Block a user