From de4648a127ace3765f2c8844a32630c1b87a1545 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 9 Nov 2012 22:33:54 +0100 Subject: [PATCH] (Android) Possible context fix --- gfx/context/androidegl_ctx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gfx/context/androidegl_ctx.c b/gfx/context/androidegl_ctx.c index 176fe63381..bf5647e4e4 100644 --- a/gfx/context/androidegl_ctx.c +++ b/gfx/context/androidegl_ctx.c @@ -89,7 +89,6 @@ static bool gfx_ctx_init(void) EGL_RED_SIZE, 8, EGL_NONE }; - EGLConfig config; EGLint num_config; EGLint egl_version_major, egl_version_minor; EGLint format; @@ -124,7 +123,7 @@ static bool gfx_ctx_init(void) goto error; } - int var = eglGetConfigAttrib(g_egl_dpy, config, EGL_NATIVE_VISUAL_ID, &format); + int var = eglGetConfigAttrib(g_egl_dpy, g_config, EGL_NATIVE_VISUAL_ID, &format); if (!var) { @@ -134,13 +133,13 @@ static bool gfx_ctx_init(void) ANativeWindow_setBuffersGeometry(g_android.app->window, 0, 0, format); - if (!(g_egl_surf = eglCreateWindowSurface(g_egl_dpy, config, g_android.app->window, 0))) + if (!(g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_config, g_android.app->window, 0))) { RARCH_ERR("eglCreateWindowSurface failed.\n"); goto error; } - if (!(g_egl_ctx = eglCreateContext(g_egl_dpy, config, 0, context_attributes))) + if (!(g_egl_ctx = eglCreateContext(g_egl_dpy, g_config, 0, context_attributes))) { RARCH_ERR("eglCreateContext failed.\n"); goto error;