mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Create public init_menu/uninit_menu
This commit is contained in:
parent
17b5b55314
commit
8f7e9edd88
27
driver.c
27
driver.c
@ -506,7 +506,7 @@ bool driver_update_system_av_info(const struct retro_system_av_info *info)
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
static void init_menu(void)
|
||||
void init_menu(void)
|
||||
{
|
||||
if (driver.menu)
|
||||
return;
|
||||
@ -517,6 +517,9 @@ static void init_menu(void)
|
||||
RARCH_ERR("Cannot initialize menu.\n");
|
||||
rarch_fail(1, "init_menu()");
|
||||
}
|
||||
|
||||
if (driver.menu && driver.menu_ctx && driver.menu_ctx->context_reset)
|
||||
driver.menu_ctx->context_reset(driver.menu);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -569,9 +572,6 @@ void init_drivers(void)
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
init_menu();
|
||||
|
||||
if (driver.menu && driver.menu_ctx && driver.menu_ctx->context_reset)
|
||||
driver.menu_ctx->context_reset(driver.menu);
|
||||
#endif
|
||||
|
||||
// Keep non-throttled state as good as possible.
|
||||
@ -629,14 +629,9 @@ static void compute_monitor_fps_statistics(void)
|
||||
}
|
||||
}
|
||||
|
||||
void uninit_drivers(void)
|
||||
{
|
||||
uninit_audio();
|
||||
|
||||
if (g_extern.system.hw_render_callback.context_destroy && !driver.video_cache_context)
|
||||
g_extern.system.hw_render_callback.context_destroy();
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
void uninit_menu(void)
|
||||
{
|
||||
if (driver.menu && driver.menu_ctx && driver.menu_ctx->context_destroy)
|
||||
driver.menu_ctx->context_destroy(driver.menu);
|
||||
|
||||
@ -645,8 +640,18 @@ void uninit_drivers(void)
|
||||
menu_free(driver.menu);
|
||||
driver.menu = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void uninit_drivers(void)
|
||||
{
|
||||
uninit_audio();
|
||||
|
||||
if (g_extern.system.hw_render_callback.context_destroy && !driver.video_cache_context)
|
||||
g_extern.system.hw_render_callback.context_destroy();
|
||||
|
||||
uninit_menu();
|
||||
|
||||
uninit_video_input();
|
||||
|
||||
if (!driver.video_data_own)
|
||||
|
@ -746,6 +746,11 @@ int rarch_main(int argc, char *argv[]);
|
||||
#define MAX_ARGS 32
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
void init_menu(void);
|
||||
void uninit_menu(void);
|
||||
#endif
|
||||
|
||||
void rarch_main_init_wrap(const struct rarch_main_wrap *args, int *argc, char **argv);
|
||||
|
||||
int rarch_main_init(int argc, char *argv[]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user