diff --git a/menu/menu_driver.c b/menu/menu_driver.c index f944d1b8a0..292e18e35f 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -681,6 +681,8 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) menu_free(menu_driver_data); menu_driver_data = NULL; break; + case RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT: + return menu->load_no_content; case RARCH_MENU_CTL_SET_LOAD_NO_CONTENT: menu->load_no_content = true; break; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 4a3bd1f77b..96ef4e77bb 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -107,6 +107,7 @@ enum rarch_menu_ctl_state RARCH_MENU_CTL_SET_OWN_DRIVER, RARCH_MENU_CTL_UNSET_OWN_DRIVER, RARCH_MENU_CTL_OWNS_DRIVER, + RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, RARCH_MENU_CTL_SET_LOAD_NO_CONTENT, RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT }; diff --git a/runloop.c b/runloop.c index fe7e29f32c..035836aa0d 100644 --- a/runloop.c +++ b/runloop.c @@ -948,9 +948,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data) case RUNLOOP_CTL_PREPARE_DUMMY: { #ifdef HAVE_MENU - menu_handle_t *menu = menu_driver_get_ptr(); - if (menu) - menu->load_no_content = false; + menu_driver_ctl(RARCH_MENU_CTL_UNSET_LOAD_NO_CONTENT, NULL); #endif runloop_data_clear_state(); diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index a74dffa1bf..b2e52b618a 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -299,7 +299,6 @@ extern void action_ok_push_quick_menu(void); if (result == NSOKButton && panel.URL) { - menu_handle_t *menu = menu_driver_get_ptr(); settings_t *settings = config_get_ptr(); NSURL *url = (NSURL*)panel.URL; NSString *__core = url.path; @@ -309,7 +308,7 @@ extern void action_ok_push_quick_menu(void); runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, (void*)__core.UTF8String); ui_companion_event_command(EVENT_CMD_LOAD_CORE); - if (menu->load_no_content && settings->core.set_supports_no_game_enable) + if (menu_driver_ctl(RARCH_MENU_CTL_HAS_LOAD_NO_CONTENT, NULL) && settings->core.set_supports_no_game_enable) { int ret = 0; runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL);