mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Create menu_context_reset
This commit is contained in:
parent
326e7907ae
commit
e661d980cf
5
driver.c
5
driver.c
@ -392,12 +392,7 @@ void init_drivers(int flags)
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
if (flags & DRIVER_MENU)
|
||||
{
|
||||
init_menu();
|
||||
|
||||
if (driver->menu_ctx && driver->menu_ctx->context_reset)
|
||||
driver->menu_ctx->context_reset();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (flags & (DRIVER_VIDEO | DRIVER_AUDIO))
|
||||
|
18
menu/menu.c
18
menu/menu.c
@ -66,6 +66,16 @@ static void draw_frame(void)
|
||||
rarch_render_cached_frame();
|
||||
}
|
||||
|
||||
void menu_context_reset(void)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
if (!driver)
|
||||
return;
|
||||
|
||||
if (driver->menu_ctx && driver->menu_ctx->context_reset)
|
||||
driver->menu_ctx->context_reset();
|
||||
}
|
||||
|
||||
/**
|
||||
* menu_update_libretro_info:
|
||||
* @info : Pointer to system info
|
||||
@ -74,17 +84,14 @@ static void draw_frame(void)
|
||||
**/
|
||||
static void menu_update_libretro_info(struct retro_system_info *info)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
retro_get_system_info(info);
|
||||
#endif
|
||||
|
||||
rarch_main_command(RARCH_CMD_CORE_INFO_INIT);
|
||||
if (driver->menu_ctx && driver->menu_ctx->context_reset)
|
||||
driver->menu_ctx->context_reset();
|
||||
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE_PERSIST);
|
||||
|
||||
menu_context_reset();
|
||||
}
|
||||
|
||||
static void menu_environment_get(int *argc, char *argv[],
|
||||
@ -256,6 +263,7 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* menu_free_list:
|
||||
* @data : Menu handle.
|
||||
|
@ -193,6 +193,8 @@ void menu_free(void *data);
|
||||
**/
|
||||
bool menu_load_content(void);
|
||||
|
||||
void menu_context_reset(void);
|
||||
|
||||
void menu_update_system_info(menu_handle_t *menu, bool *load_no_content);
|
||||
|
||||
void menu_apply_deferred_settings(void);
|
||||
|
@ -164,6 +164,8 @@ void init_menu(void)
|
||||
RARCH_ERR("Cannot initialize menu lists.\n");
|
||||
rarch_fail(1, "init_menu()");
|
||||
}
|
||||
|
||||
menu_context_reset();
|
||||
}
|
||||
|
||||
menu_handle_t *menu_driver_get_ptr(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user