mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
Simplify egl_destroy
This commit is contained in:
parent
36b278fb84
commit
774542fc62
@ -72,7 +72,7 @@ gfx_ctx_proc_t egl_get_proc_address(const char *symbol)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void egl_destroy(void)
|
||||
void egl_destroy(void *data)
|
||||
{
|
||||
if (g_egl_dpy)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ extern unsigned g_interval;
|
||||
|
||||
void egl_report_error(void);
|
||||
|
||||
void egl_destroy(void);
|
||||
void egl_destroy(void *data);
|
||||
|
||||
gfx_ctx_proc_t egl_get_proc_address(const char *symbol);
|
||||
|
||||
|
@ -33,11 +33,6 @@ int system_property_get(const char *cmd, const char *args, char *value);
|
||||
|
||||
static bool g_es3;
|
||||
|
||||
static void android_gfx_ctx_destroy(void *data)
|
||||
{
|
||||
egl_destroy();
|
||||
}
|
||||
|
||||
static bool android_gfx_ctx_init(void *data)
|
||||
{
|
||||
int var;
|
||||
@ -123,7 +118,7 @@ static bool android_gfx_ctx_init(void *data)
|
||||
return true;
|
||||
|
||||
error:
|
||||
egl_destroy();
|
||||
egl_destroy(NULL);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -270,7 +265,7 @@ static bool android_gfx_ctx_get_metrics(void *data,
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_android = {
|
||||
android_gfx_ctx_init,
|
||||
android_gfx_ctx_destroy,
|
||||
egl_destroy,
|
||||
android_gfx_ctx_bind_api,
|
||||
egl_set_swap_interval,
|
||||
android_gfx_ctx_set_video_mode,
|
||||
|
@ -45,7 +45,7 @@ static enum gfx_ctx_api g_api;
|
||||
|
||||
static void gfx_ctx_qnx_destroy(void *data)
|
||||
{
|
||||
egl_destroy();
|
||||
egl_destroy(data);
|
||||
|
||||
g_resize = false;
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ static void gfx_ctx_drm_egl_destroy_resources(gfx_ctx_drm_egl_data_t *drm)
|
||||
if (waiting_for_flip)
|
||||
wait_flip(true);
|
||||
|
||||
egl_destroy();
|
||||
egl_destroy(NULL);
|
||||
|
||||
/* Restore original CRTC. */
|
||||
if (drm->g_orig_crtc)
|
||||
|
@ -205,7 +205,7 @@ static bool gfx_ctx_emscripten_bind_api(void *data,
|
||||
|
||||
static void gfx_ctx_emscripten_destroy(void *data)
|
||||
{
|
||||
egl_destroy();
|
||||
egl_destroy(data);
|
||||
|
||||
g_inited = false;
|
||||
}
|
||||
|
@ -48,9 +48,7 @@ static void gfx_ctx_mali_fbdev_destroy(void *data)
|
||||
int fb;
|
||||
RFILE *fd;
|
||||
|
||||
(void)data;
|
||||
|
||||
egl_destroy();
|
||||
egl_destroy(data);
|
||||
|
||||
g_quit = 0;
|
||||
g_resize = false;
|
||||
|
@ -35,9 +35,7 @@ static void sighandler(int sig)
|
||||
|
||||
static void gfx_ctx_vivante_destroy(void *data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
egl_destroy();
|
||||
egl_destroy(data);
|
||||
|
||||
g_quit = 0;
|
||||
g_resize = false;
|
||||
|
@ -143,7 +143,7 @@ static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl)
|
||||
if (!wl)
|
||||
return;
|
||||
|
||||
egl_destroy();
|
||||
egl_destroy(NULL);
|
||||
|
||||
if (wl->g_win)
|
||||
wl_egl_window_destroy(wl->g_win);
|
||||
|
@ -405,11 +405,8 @@ error:
|
||||
|
||||
static void gfx_ctx_xegl_destroy(void *data)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
x11_input_ctx_destroy();
|
||||
|
||||
egl_destroy();
|
||||
egl_destroy(data);
|
||||
|
||||
if (g_x11_win)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user