Revert "We can now change menu drivers on the fly"

This reverts commit 85afd633e4ea49336a848c7c4f7768716f1e5d04.
This commit is contained in:
twinaphex 2017-05-17 04:14:29 +02:00
parent aa10eecbbf
commit 7e08752da2
2 changed files with 24 additions and 6 deletions

View File

@ -311,8 +311,7 @@ void drivers_init(int flags)
#ifdef HAVE_MENU
/* By default, we want the menu to persist through driver reinits. */
if (flags & DRIVER_MENU_MASK)
menu_driver_ctl(RARCH_MENU_CTL_SET_OWN_DRIVER, NULL);
menu_driver_ctl(RARCH_MENU_CTL_SET_OWN_DRIVER, NULL);
#endif
if (flags & (DRIVER_VIDEO_MASK | DRIVER_AUDIO_MASK))
@ -397,7 +396,7 @@ static void uninit_drivers(int flags)
core_info_free_current_core();
#ifdef HAVE_MENU
if (flags & DRIVER_MENU_MASK && !menu_driver_ctl(RARCH_MENU_CTL_OWNS_DRIVER, NULL))
if (flags & DRIVER_MENU_MASK)
menu_driver_ctl(RARCH_MENU_CTL_DEINIT, NULL);
#endif

View File

@ -322,6 +322,25 @@ void menu_driver_frame(video_frame_info_t *video_info)
menu_driver_ctx->frame(menu_userdata, video_info);
}
/**
* menu_update_libretro_info:
*
* Update menu state which depends on config.
**/
static void menu_update_libretro_info(void)
{
struct retro_system_info *info = NULL;
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET,
&info);
if (!info)
return;
command_event(CMD_EVENT_CORE_INFO_INIT, NULL);
command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
}
bool menu_driver_render(bool is_idle, bool rarch_is_inited,
bool rarch_is_dummy_core)
{
@ -447,9 +466,9 @@ static bool menu_driver_context_reset(bool video_is_threaded)
static bool menu_driver_init_internal(bool video_is_threaded)
{
settings_t *settings = config_get_ptr();
command_event(CMD_EVENT_CORE_INFO_INIT, NULL);
command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
menu_update_libretro_info();
if (menu_driver_data)
return true;
menu_driver_data = (menu_handle_t*)
menu_driver_ctx->init(&menu_userdata, video_is_threaded);