mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 17:43:02 +00:00
Don't segfault on fullscreen swapping.
This commit is contained in:
parent
b9f605cc9d
commit
6052af0327
@ -324,7 +324,11 @@ void gfx_ctx_destroy(void)
|
||||
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_surf)
|
||||
eglDestroySurface(g_egl_dpy, g_egl_surf);
|
||||
eglTerminate(g_egl_dpy);
|
||||
@ -333,9 +337,11 @@ void gfx_ctx_destroy(void)
|
||||
g_egl_ctx = NULL;
|
||||
g_egl_surf = NULL;
|
||||
g_egl_dpy = NULL;
|
||||
g_config = 0;
|
||||
|
||||
if (g_win)
|
||||
{
|
||||
XUnmapWindow(g_dpy, g_win);
|
||||
XDestroyWindow(g_dpy, g_win);
|
||||
g_win = None;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user