From efa673c7b0b55bb7cf58bde8a2d4337e1e16f536 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 21 Nov 2015 09:37:26 +0100 Subject: [PATCH] Make g_egl_use_hw_ctx a static variable --- gfx/common/egl_common.c | 6 +++--- gfx/common/egl_common.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gfx/common/egl_common.c b/gfx/common/egl_common.c index acf953587f..f50d63b1be 100644 --- a/gfx/common/egl_common.c +++ b/gfx/common/egl_common.c @@ -30,7 +30,7 @@ EGLDisplay g_egl_dpy; EGLConfig g_egl_config; enum gfx_ctx_api g_egl_api; bool g_egl_inited; -bool g_use_hw_ctx; +static bool g_egl_use_hw_ctx; unsigned g_interval; void egl_report_error(void) @@ -116,7 +116,7 @@ void egl_destroy(void *data) void egl_bind_hw_render(void *data, bool enable) { - g_use_hw_ctx = enable; + g_egl_use_hw_ctx = enable; if (!g_egl_dpy || !g_egl_surf) return; @@ -216,7 +216,7 @@ bool egl_create_context(EGLint *egl_attribs) if (g_egl_ctx == EGL_NO_CONTEXT) return false; - if (g_use_hw_ctx) + if (g_egl_use_hw_ctx) { g_egl_hw_ctx = eglCreateContext(g_egl_dpy, g_egl_config, g_egl_ctx, egl_attribs); diff --git a/gfx/common/egl_common.h b/gfx/common/egl_common.h index 8f0437b7a3..2d6bad7aac 100644 --- a/gfx/common/egl_common.h +++ b/gfx/common/egl_common.h @@ -34,7 +34,6 @@ extern EGLDisplay g_egl_dpy; extern EGLConfig g_egl_config; extern enum gfx_ctx_api g_egl_api; extern bool g_egl_inited; -extern bool g_use_hw_ctx; extern unsigned g_interval; void egl_report_error(void);