mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
video_driver_unset_callback - have destroy_callback do this
implicitly
This commit is contained in:
parent
772aa6ef0c
commit
3e69eb5a8e
@ -530,6 +530,9 @@ void video_driver_callback_destroy_context(void)
|
|||||||
(const struct retro_hw_render_callback*)video_driver_callback();
|
(const struct retro_hw_render_callback*)video_driver_callback();
|
||||||
if (hw_render->context_destroy)
|
if (hw_render->context_destroy)
|
||||||
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)
|
static bool uninit_video_input(void)
|
||||||
@ -537,10 +540,7 @@ static bool uninit_video_input(void)
|
|||||||
event_cmd_ctl(EVENT_CMD_OVERLAY_DEINIT, NULL);
|
event_cmd_ctl(EVENT_CMD_OVERLAY_DEINIT, NULL);
|
||||||
|
|
||||||
if (!video_driver_ctl(RARCH_DISPLAY_CTL_IS_VIDEO_CACHE_CONTEXT, NULL))
|
if (!video_driver_ctl(RARCH_DISPLAY_CTL_IS_VIDEO_CACHE_CONTEXT, NULL))
|
||||||
{
|
|
||||||
video_driver_callback_destroy_context();
|
video_driver_callback_destroy_context();
|
||||||
video_driver_unset_callback();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!input_driver_ctl(RARCH_INPUT_CTL_OWNS_DRIVER, NULL) &&
|
!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;
|
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,
|
static bool video_driver_frame_filter(const void *data,
|
||||||
unsigned width, unsigned height,
|
unsigned width, unsigned height,
|
||||||
size_t pitch,
|
size_t pitch,
|
||||||
|
@ -328,7 +328,6 @@ struct aspect_ratio_elem
|
|||||||
|
|
||||||
extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END];
|
extern struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END];
|
||||||
|
|
||||||
|
|
||||||
bool video_driver_ctl(enum rarch_display_ctl_state state, void *data);
|
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);
|
void video_driver_set_aspect_ratio_value(float value);
|
||||||
|
|
||||||
struct retro_hw_render_callback *video_driver_callback(void);
|
struct retro_hw_render_callback *video_driver_callback(void);
|
||||||
void video_driver_unset_callback(void);
|
|
||||||
void video_driver_callback_destroy_context(void);
|
void video_driver_callback_destroy_context(void);
|
||||||
|
|
||||||
rarch_softfilter_t *video_driver_frame_filter_get_ptr(void);
|
rarch_softfilter_t *video_driver_frame_filter_get_ptr(void);
|
||||||
|
@ -310,7 +310,6 @@ bool core_ctl(enum core_ctl_state state, void *data)
|
|||||||
break;
|
break;
|
||||||
case CORE_CTL_RETRO_UNLOAD_GAME:
|
case CORE_CTL_RETRO_UNLOAD_GAME:
|
||||||
video_driver_callback_destroy_context();
|
video_driver_callback_destroy_context();
|
||||||
video_driver_unset_callback();
|
|
||||||
core.retro_unload_game();
|
core.retro_unload_game();
|
||||||
break;
|
break;
|
||||||
case CORE_CTL_RETRO_RUN:
|
case CORE_CTL_RETRO_RUN:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user