From b69caea6c1f5bf7272d417b88a28971967dcb000 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 21 Nov 2015 09:39:25 +0100 Subject: [PATCH] Set g_egl_inited to false after egl_destroy --- gfx/common/egl_common.c | 1 + gfx/drivers_context/emscriptenegl_ctx.c | 2 -- gfx/drivers_context/xegl_ctx.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/gfx/common/egl_common.c b/gfx/common/egl_common.c index f50d63b1be..9e80b174ef 100644 --- a/gfx/common/egl_common.c +++ b/gfx/common/egl_common.c @@ -112,6 +112,7 @@ void egl_destroy(void *data) g_egl_config = 0; g_egl_quit = 0; g_egl_api = GFX_CTX_NONE; + g_egl_inited = false; } void egl_bind_hw_render(void *data, bool enable) diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index da882da09b..60221ef9ca 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -191,8 +191,6 @@ static bool gfx_ctx_emscripten_bind_api(void *data, static void gfx_ctx_emscripten_destroy(void *data) { egl_destroy(data); - - g_egl_inited = false; } static void gfx_ctx_emscripten_input_driver(void *data, diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index 00be46747a..0d958807dc 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -79,7 +79,6 @@ static void gfx_ctx_xegl_destroy(void *data) /* Do not close g_x11_dpy. We'll keep one for the entire application * lifecycle to work-around nVidia EGL limitations. */ - g_egl_inited = false; } static void gfx_ctx_xegl_set_resize(void *data,