diff --git a/driver.c b/driver.c index ca54f14b55..b4e5778654 100644 --- a/driver.c +++ b/driver.c @@ -355,7 +355,7 @@ void drivers_init(int flags) if (flags & DRIVER_MENU_MASK) { menu_driver_ctl(RARCH_MENU_CTL_INIT, NULL); - menu_driver_ctl(RARCH_MENU_CTL_CONTEXT_RESET, NULL); + menu_driver_context_reset(video_is_threaded); } } #endif diff --git a/menu/menu_driver.c b/menu/menu_driver.c index eafbc338e9..2f813efa25 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -458,6 +458,14 @@ void menu_driver_decrement_navigation(void) menu_driver_ctx->navigation_decrement(menu_userdata); } +bool menu_driver_context_reset(bool is_threaded) +{ + if (!menu_driver_ctx || !menu_driver_ctx->context_reset) + return false; + menu_driver_ctx->context_reset(menu_userdata); + return true; +} + bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) { switch (state) @@ -812,11 +820,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data) #endif } break; - case RARCH_MENU_CTL_CONTEXT_RESET: - if (!menu_driver_ctx || !menu_driver_ctx->context_reset) - return false; - menu_driver_ctx->context_reset(menu_userdata); - break; case RARCH_MENU_CTL_CONTEXT_DESTROY: if (!menu_driver_ctx || !menu_driver_ctx->context_destroy) return false; diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 2147c744e8..a211900f6a 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -112,7 +112,6 @@ enum rarch_menu_ctl_state RARCH_MENU_CTL_PLAYLIST_INIT, RARCH_MENU_CTL_PLAYLIST_GET, RARCH_MENU_CTL_TOGGLE, - RARCH_MENU_CTL_CONTEXT_RESET, RARCH_MENU_CTL_CONTEXT_DESTROY, RARCH_MENU_CTL_POPULATE_ENTRIES, RARCH_MENU_CTL_FIND_DRIVER, @@ -401,6 +400,8 @@ bool menu_driver_list_clear(void *data); void menu_driver_increment_navigation(void); +bool menu_driver_context_reset(bool is_threaded); + void menu_driver_decrement_navigation(void); extern menu_ctx_driver_t menu_ctx_xui;