mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 20:43:10 +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
|
#ifdef HAVE_MENU
|
||||||
if (flags & DRIVER_MENU)
|
if (flags & DRIVER_MENU)
|
||||||
{
|
|
||||||
init_menu();
|
init_menu();
|
||||||
|
|
||||||
if (driver->menu_ctx && driver->menu_ctx->context_reset)
|
|
||||||
driver->menu_ctx->context_reset();
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (flags & (DRIVER_VIDEO | DRIVER_AUDIO))
|
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();
|
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:
|
* menu_update_libretro_info:
|
||||||
* @info : Pointer to system 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)
|
static void menu_update_libretro_info(struct retro_system_info *info)
|
||||||
{
|
{
|
||||||
driver_t *driver = driver_get_ptr();
|
|
||||||
|
|
||||||
#ifndef HAVE_DYNAMIC
|
#ifndef HAVE_DYNAMIC
|
||||||
retro_get_system_info(info);
|
retro_get_system_info(info);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rarch_main_command(RARCH_CMD_CORE_INFO_INIT);
|
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);
|
rarch_main_command(RARCH_CMD_LOAD_CORE_PERSIST);
|
||||||
|
|
||||||
|
menu_context_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void menu_environment_get(int *argc, char *argv[],
|
static void menu_environment_get(int *argc, char *argv[],
|
||||||
@ -256,6 +263,7 @@ error:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* menu_free_list:
|
* menu_free_list:
|
||||||
* @data : Menu handle.
|
* @data : Menu handle.
|
||||||
|
@ -193,6 +193,8 @@ void menu_free(void *data);
|
|||||||
**/
|
**/
|
||||||
bool menu_load_content(void);
|
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_update_system_info(menu_handle_t *menu, bool *load_no_content);
|
||||||
|
|
||||||
void menu_apply_deferred_settings(void);
|
void menu_apply_deferred_settings(void);
|
||||||
|
@ -164,6 +164,8 @@ void init_menu(void)
|
|||||||
RARCH_ERR("Cannot initialize menu lists.\n");
|
RARCH_ERR("Cannot initialize menu lists.\n");
|
||||||
rarch_fail(1, "init_menu()");
|
rarch_fail(1, "init_menu()");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
menu_context_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_handle_t *menu_driver_get_ptr(void)
|
menu_handle_t *menu_driver_get_ptr(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user