mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-21 02:08:16 +00:00
(QNX) Implement destroy function correctly
This commit is contained in:
parent
089ab9441c
commit
d16395ffa6
@ -61,17 +61,31 @@ static void gfx_ctx_qnx_set_swap_interval(void *data, unsigned interval)
|
||||
static void gfx_ctx_qnx_destroy(void *data)
|
||||
{
|
||||
(void)data;
|
||||
eglMakeCurrent(g_egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
eglDestroyContext(g_egl_dpy, g_egl_ctx);
|
||||
eglDestroySurface(g_egl_dpy, g_egl_surf);
|
||||
eglTerminate(g_egl_dpy);
|
||||
//eglReleaseThread();
|
||||
|
||||
g_egl_dpy = EGL_NO_DISPLAY;
|
||||
g_egl_surf = EGL_NO_SURFACE;
|
||||
g_egl_ctx = EGL_NO_CONTEXT;
|
||||
g_config = 0;
|
||||
g_resize = false;
|
||||
if (g_egl_dpy)
|
||||
{
|
||||
if (g_egl_ctx)
|
||||
{
|
||||
eglMakeCurrent(g_egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
eglDestroyContext(g_egl_dpy, g_egl_ctx);
|
||||
}
|
||||
|
||||
if (g_egl_hw_ctx)
|
||||
eglDestroyContext(g_egl_dpy, g_egl_hw_ctx);
|
||||
|
||||
if (g_egl_surf)
|
||||
eglDestroySurface(g_egl_dpy, g_egl_surf);
|
||||
eglTerminate(g_egl_dpy);
|
||||
}
|
||||
|
||||
// Be as careful as possible in deinit.
|
||||
|
||||
g_egl_ctx = NULL;
|
||||
g_egl_hw_ctx = NULL;
|
||||
g_egl_surf = NULL;
|
||||
g_egl_dpy = NULL;
|
||||
g_config = 0;
|
||||
g_resize = false;
|
||||
}
|
||||
|
||||
static void gfx_ctx_qnx_get_video_size(void *data, unsigned *width, unsigned *height)
|
||||
|
Loading…
Reference in New Issue
Block a user