(Menu) Add iterate to menu_ctx_driver_t - needed for RMenu XUI

This commit is contained in:
twinaphex 2013-11-19 06:35:11 +01:00
parent 8fe6a04b56
commit 7843a3bec3
5 changed files with 7 additions and 4 deletions

View File

@ -582,5 +582,6 @@ const menu_ctx_driver_t menu_ctx_rgui = {
NULL,
NULL,
NULL,
NULL,
"rgui",
};

View File

@ -477,5 +477,6 @@ const menu_ctx_driver_t menu_ctx_rmenu = {
rmenu_init_assets,
rmenu_free_assets,
NULL,
NULL,
"rmenu",
};

View File

@ -37,10 +37,6 @@ const menu_ctx_driver_t *menu_ctx;
//forward decl
static int menu_iterate_func(void *data, unsigned action);
#if defined(HAVE_RMENU_XUI)
#define menu_iterate_func(a, b) rmenu_xui_iterate(a, b)
#endif
#ifdef HAVE_SHADER_MANAGER
void shader_manager_init(void *data)
{
@ -1355,6 +1351,9 @@ static int menu_iterate_func(void *data, unsigned action)
menu_parse_and_resolve(rgui, menu_type);
}
if (menu_ctx && menu_ctx->iterate)
menu_ctx->iterate(rgui, action);
if (menu_ctx && menu_ctx->render)
menu_ctx->render(rgui);

View File

@ -34,6 +34,7 @@ typedef struct menu_ctx_driver
void (*init_assets)(void*);
void (*free_assets)(void*);
void (*populate_entries)(void*, unsigned);
void (*iterate)(void*, unsigned);
// Human readable string.
const char *ident;

View File

@ -1431,5 +1431,6 @@ const menu_ctx_driver_t menu_ctx_rmenu_xui = {
NULL,
NULL,
rmenu_xui_populate_entries,
rmenu_xui_iterate,
"rmenu_xui",
};