mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 16:20:39 +00:00
Create more menu driver wrapper functions
This commit is contained in:
parent
a760d25384
commit
e8060a2423
@ -155,8 +155,7 @@ bool menu_load_content(void)
|
|||||||
if (driver->menu)
|
if (driver->menu)
|
||||||
driver->menu->msg_force = true;
|
driver->menu->msg_force = true;
|
||||||
|
|
||||||
if (driver->menu_ctx && driver->menu_ctx->entry_iterate)
|
menu_driver_entry_iterate(MENU_ACTION_NOOP);
|
||||||
driver->menu_ctx->entry_iterate(MENU_ACTION_NOOP);
|
|
||||||
|
|
||||||
draw_frame();
|
draw_frame();
|
||||||
|
|
||||||
@ -294,8 +293,7 @@ void menu_free(void *data)
|
|||||||
menu->shader = NULL;
|
menu->shader = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (driver->menu_ctx && driver->menu_ctx->free)
|
menu_driver_free(menu);
|
||||||
driver->menu_ctx->free(menu);
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBRETRODB
|
#ifdef HAVE_LIBRETRODB
|
||||||
menu_database_free(menu);
|
menu_database_free(menu);
|
||||||
@ -426,8 +424,7 @@ int menu_iterate(retro_input_t input,
|
|||||||
last_clock_update = menu->cur_time;
|
last_clock_update = menu->cur_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (driver->menu_ctx && driver->menu_ctx->entry_iterate)
|
menu_driver_entry_iterate(action);
|
||||||
ret = driver->menu_ctx->entry_iterate(action);
|
|
||||||
|
|
||||||
if (runloop->is_menu && !runloop->is_idle)
|
if (runloop->is_menu && !runloop->is_idle)
|
||||||
draw_frame();
|
draw_frame();
|
||||||
|
@ -255,3 +255,23 @@ void menu_driver_frame(void)
|
|||||||
if (driver->menu_ctx && driver->menu_ctx->frame)
|
if (driver->menu_ctx && driver->menu_ctx->frame)
|
||||||
driver->menu_ctx->frame();
|
driver->menu_ctx->frame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void menu_driver_entry_iterate(unsigned action)
|
||||||
|
{
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
|
if (!driver)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (driver->menu_ctx && driver->menu_ctx->entry_iterate)
|
||||||
|
driver->menu_ctx->entry_iterate(action);
|
||||||
|
}
|
||||||
|
|
||||||
|
void menu_driver_free(menu_handle_t *menu)
|
||||||
|
{
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
|
if (!driver)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (driver->menu_ctx && driver->menu_ctx->free)
|
||||||
|
driver->menu_ctx->free(menu);
|
||||||
|
}
|
||||||
|
@ -304,6 +304,10 @@ void menu_driver_frame(void);
|
|||||||
|
|
||||||
void menu_driver_context_reset(void);
|
void menu_driver_context_reset(void);
|
||||||
|
|
||||||
|
void menu_driver_entry_iterate(unsigned action);
|
||||||
|
|
||||||
|
void menu_driver_free(menu_handle_t *menu);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user