From 206ea8012f1ec4ec1917350ffa245f4cf358980d Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 31 May 2014 23:53:03 +0200 Subject: [PATCH] Don't completely reinit menu driver unless we're killing Rarch. --- driver.c | 3 ++- frontend/frontend.c | 3 +++ retroarch.c | 8 -------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/driver.c b/driver.c index faf70c86a0..a6c305c8b8 100644 --- a/driver.c +++ b/driver.c @@ -535,7 +535,8 @@ void init_drivers(void) driver.osk_data_own = false; #endif #ifdef HAVE_MENU - driver.menu_data_own = false; + // By default, we want the menu to persist through driver reinits. + driver.menu_data_own = true; #endif adjust_system_rates(); diff --git a/frontend/frontend.c b/frontend/frontend.c index f4b8b1c37d..307d170394 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -258,7 +258,10 @@ void main_exit(args_type() args) } if (g_extern.main_is_init) + { + driver.menu_data_own = false; // Do not want menu context to live any more. rarch_main_deinit(); + } rarch_deinit_msg_queue(); #ifdef PERF_TEST diff --git a/retroarch.c b/retroarch.c index e7d03b43a1..6e013d4a09 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1963,10 +1963,6 @@ static void check_savestates(bool immutable) void rarch_set_fullscreen(bool fullscreen) { -#ifdef HAVE_MENU - driver.menu_data_own = true; // Don't reinit menu for something trivial. -#endif - g_settings.video.fullscreen = fullscreen; driver.video_cache_context = g_extern.system.hw_render_callback.cache_context; driver.video_cache_context_ack = false; @@ -1977,10 +1973,6 @@ void rarch_set_fullscreen(bool fullscreen) // Poll input to avoid possibly stale data to corrupt things. if (driver.input) input_poll_func(); - -#ifdef HAVE_MENU - driver.menu_data_own = false; -#endif } bool rarch_check_fullscreen(void)