diff --git a/gfx/video_driver.c b/gfx/video_driver.c index c3ed96b009..1e51836f4f 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -530,6 +530,9 @@ void video_driver_callback_destroy_context(void) (const struct retro_hw_render_callback*)video_driver_callback(); if (hw_render->context_destroy) hw_render->context_destroy(); + + memset(&video_driver_state.hw_render_callback, 0, + sizeof(video_driver_state.hw_render_callback)); } static bool uninit_video_input(void) @@ -537,10 +540,7 @@ static bool uninit_video_input(void) event_cmd_ctl(EVENT_CMD_OVERLAY_DEINIT, NULL); if (!video_driver_ctl(RARCH_DISPLAY_CTL_IS_VIDEO_CACHE_CONTEXT, NULL)) - { video_driver_callback_destroy_context(); - video_driver_unset_callback(); - } if ( !input_driver_ctl(RARCH_INPUT_CTL_OWNS_DRIVER, NULL) && @@ -1109,12 +1109,6 @@ struct retro_hw_render_callback *video_driver_callback(void) return &video_driver_state.hw_render_callback; } -void video_driver_unset_callback(void) -{ - memset(&video_driver_state.hw_render_callback, 0, - sizeof(video_driver_state.hw_render_callback)); -} - static bool video_driver_frame_filter(const void *data, unsigned width, unsigned height, size_t pitch, diff --git a/gfx/video_driver.h b/gfx/video_driver.h index d0a927f13d..40c9120471 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -328,7 +328,6 @@ struct aspect_ratio_elem extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END]; - bool video_driver_ctl(enum rarch_display_ctl_state state, void *data); /** @@ -433,7 +432,6 @@ float video_driver_get_aspect_ratio(void); void video_driver_set_aspect_ratio_value(float value); struct retro_hw_render_callback *video_driver_callback(void); -void video_driver_unset_callback(void); void video_driver_callback_destroy_context(void); rarch_softfilter_t *video_driver_frame_filter_get_ptr(void); diff --git a/libretro_version_1.c b/libretro_version_1.c index 2c158e3eb2..ef24ec5400 100644 --- a/libretro_version_1.c +++ b/libretro_version_1.c @@ -310,7 +310,6 @@ bool core_ctl(enum core_ctl_state state, void *data) break; case CORE_CTL_RETRO_UNLOAD_GAME: video_driver_callback_destroy_context(); - video_driver_unset_callback(); core.retro_unload_game(); break; case CORE_CTL_RETRO_RUN: