mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Add GFX_CTL_FREE
This commit is contained in:
parent
753fd86c2e
commit
fab6c9b8c4
@ -1171,7 +1171,7 @@ static void d3d_free(void *data)
|
||||
d3d_free_overlays(d3d);
|
||||
#endif
|
||||
|
||||
gfx_ctx_free();
|
||||
gfx_ctx_ctl(GFX_CTL_FREE, NULL);
|
||||
|
||||
#ifndef _XBOX
|
||||
#ifdef HAVE_MENU
|
||||
|
@ -1994,7 +1994,7 @@ static void gl_free(void *data)
|
||||
}
|
||||
#endif
|
||||
|
||||
gfx_ctx_free();
|
||||
gfx_ctx_ctl(GFX_CTL_FREE, NULL);
|
||||
|
||||
free(gl->empty_buf);
|
||||
free(gl->conv_buffer);
|
||||
|
@ -220,7 +220,7 @@ static void vg_free(void *data)
|
||||
vgDestroyPaint(vg->mPaintBg);
|
||||
}
|
||||
|
||||
gfx_ctx_free();
|
||||
gfx_ctx_ctl(GFX_CTL_FREE, NULL);
|
||||
|
||||
free(vg);
|
||||
}
|
||||
|
@ -95,14 +95,6 @@ void gfx_ctx_destroy(const gfx_ctx_driver_t *ctx_driver)
|
||||
current_video_context = NULL;
|
||||
}
|
||||
|
||||
void gfx_ctx_free(void)
|
||||
{
|
||||
if (current_video_context->destroy)
|
||||
current_video_context->destroy(video_context_data);
|
||||
current_video_context = NULL;
|
||||
video_context_data = NULL;
|
||||
}
|
||||
|
||||
const char *gfx_ctx_get_ident(void)
|
||||
{
|
||||
const gfx_ctx_driver_t *ctx = current_video_context;
|
||||
@ -447,6 +439,12 @@ bool gfx_ctx_ctl(enum gfx_ctx_ctl_state state, void *data)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case GFX_CTL_FREE:
|
||||
if (current_video_context->destroy)
|
||||
current_video_context->destroy(video_context_data);
|
||||
current_video_context = NULL;
|
||||
video_context_data = NULL;
|
||||
break;
|
||||
case GFX_CTL_NONE:
|
||||
default:
|
||||
break;
|
||||
|
@ -53,7 +53,8 @@ enum display_metric_types
|
||||
|
||||
enum gfx_ctx_ctl_state
|
||||
{
|
||||
GFX_CTL_NONE = 0
|
||||
GFX_CTL_NONE = 0,
|
||||
GFX_CTL_FREE
|
||||
};
|
||||
|
||||
typedef void (*gfx_ctx_proc_t)(void);
|
||||
@ -248,8 +249,6 @@ bool gfx_ctx_get_video_output_next(void);
|
||||
|
||||
const char *gfx_ctx_get_ident(void);
|
||||
|
||||
void gfx_ctx_free(void);
|
||||
|
||||
void gfx_ctx_input_driver(
|
||||
const input_driver_t **input, void **input_data);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user