(Android) Possible context fix
This commit is contained in:
parent
48b0bc7f2d
commit
de4648a127
|
@ -89,7 +89,6 @@ static bool gfx_ctx_init(void)
|
||||||
EGL_RED_SIZE, 8,
|
EGL_RED_SIZE, 8,
|
||||||
EGL_NONE
|
EGL_NONE
|
||||||
};
|
};
|
||||||
EGLConfig config;
|
|
||||||
EGLint num_config;
|
EGLint num_config;
|
||||||
EGLint egl_version_major, egl_version_minor;
|
EGLint egl_version_major, egl_version_minor;
|
||||||
EGLint format;
|
EGLint format;
|
||||||
|
@ -124,7 +123,7 @@ static bool gfx_ctx_init(void)
|
||||||
goto error;
|
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)
|
if (!var)
|
||||||
{
|
{
|
||||||
|
@ -134,13 +133,13 @@ static bool gfx_ctx_init(void)
|
||||||
|
|
||||||
ANativeWindow_setBuffersGeometry(g_android.app->window, 0, 0, format);
|
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");
|
RARCH_ERR("eglCreateWindowSurface failed.\n");
|
||||||
goto error;
|
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");
|
RARCH_ERR("eglCreateContext failed.\n");
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in New Issue