diff --git a/command_event.c b/command_event.c index 2de4eaeb91..095f8b1b6f 100644 --- a/command_event.c +++ b/command_event.c @@ -395,8 +395,6 @@ static void event_deinit_core(bool reinit) cheevos_unload(); #endif - video_driver_callback_destroy_context(); - video_driver_unset_callback(); core_ctl(CORE_CTL_RETRO_UNLOAD_GAME, NULL); core_ctl(CORE_CTL_RETRO_DEINIT, NULL); diff --git a/libretro_version_1.c b/libretro_version_1.c index 3eff8ee0ef..56fd1a94a8 100644 --- a/libretro_version_1.c +++ b/libretro_version_1.c @@ -275,6 +275,8 @@ bool core_ctl(enum core_ctl_state state, void *data) core.retro_init(); break; case CORE_CTL_RETRO_DEINIT: + video_driver_callback_destroy_context(); + video_driver_unset_callback(); core.retro_deinit(); break; case CORE_CTL_RETRO_UNLOAD_GAME: