mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Create menu_driver_list_get_size
This commit is contained in:
parent
561f8888c8
commit
38ce8ffcef
@ -695,6 +695,7 @@ menu_ctx_driver_t menu_ctx_glui = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
glui_load_image,
|
||||
"glui",
|
||||
NULL,
|
||||
|
@ -655,6 +655,7 @@ menu_ctx_driver_t menu_ctx_rgui = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"rgui",
|
||||
NULL,
|
||||
};
|
||||
|
@ -326,6 +326,7 @@ menu_ctx_driver_t menu_ctx_rmenu = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"rmenu",
|
||||
NULL,
|
||||
};
|
||||
|
@ -680,6 +680,7 @@ menu_ctx_driver_t menu_ctx_rmenu_xui = {
|
||||
rmenu_xui_list_delete,
|
||||
rmenu_xui_list_clear,
|
||||
NULL,
|
||||
NULL,
|
||||
rmenu_xui_list_set_selection,
|
||||
NULL,
|
||||
"rmenu_xui",
|
||||
|
@ -2118,6 +2118,7 @@ menu_ctx_driver_t menu_ctx_xmb = {
|
||||
xmb_list_delete,
|
||||
NULL,
|
||||
xmb_list_cache,
|
||||
xmb_list_get_size,
|
||||
NULL,
|
||||
xmb_load_image,
|
||||
"xmb",
|
||||
|
@ -259,6 +259,16 @@ void menu_driver_list_cache(menu_list_type_t type, unsigned action)
|
||||
driver->list_cache(type, action);
|
||||
}
|
||||
|
||||
size_t menu_driver_list_get_size(menu_list_type_t type)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
|
||||
if (driver->list_get_size)
|
||||
return driver->list_get_size(menu, type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void menu_driver_navigation_increment(void)
|
||||
{
|
||||
const menu_ctx_driver_t *driver = menu_ctx_driver_get_ptr();
|
||||
|
@ -255,6 +255,7 @@ typedef struct menu_ctx_driver
|
||||
void (*list_delete)(file_list_t *list, size_t, size_t);
|
||||
void (*list_clear)(file_list_t *list);
|
||||
void (*list_cache)(menu_list_type_t, unsigned);
|
||||
size_t(*list_get_size)(void *data, menu_list_type_t);
|
||||
void (*list_set_selection)(file_list_t *list);
|
||||
bool (*load_image)(void *data, menu_image_type_t type);
|
||||
const char *ident;
|
||||
@ -345,6 +346,8 @@ void menu_driver_list_insert(file_list_t *list, const char *path,
|
||||
|
||||
void menu_driver_list_clear(file_list_t *list);
|
||||
|
||||
size_t menu_driver_list_get_size(menu_list_type_t type);
|
||||
|
||||
void menu_driver_list_set_selection(file_list_t *list);
|
||||
|
||||
const menu_ctx_driver_t *menu_ctx_driver_get_ptr(void);
|
||||
|
@ -143,7 +143,6 @@ static int action_left_mainmenu(unsigned type, const char *label,
|
||||
|
||||
if (file_list_get_size(menu_list->menu_stack) == 1)
|
||||
{
|
||||
|
||||
if (!strcmp(driver->menu_ctx->ident, "xmb"))
|
||||
{
|
||||
menu->navigation.selection_ptr = 0;
|
||||
|
@ -151,7 +151,6 @@ static int action_right_mainmenu(unsigned type, const char *label,
|
||||
|
||||
if (file_list_get_size(menu_list->menu_stack) == 1)
|
||||
{
|
||||
|
||||
if (!strcmp(driver->menu_ctx->ident, "xmb"))
|
||||
{
|
||||
menu->navigation.selection_ptr = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user