Cleanup egl_create_context

This commit is contained in:
twinaphex 2017-03-30 02:39:08 +02:00
parent 38f9b93885
commit 3da08c9d9e

View File

@ -238,13 +238,15 @@ bool egl_init_context(egl_ctx_data_t *egl,
bool egl_create_context(egl_ctx_data_t *egl, const EGLint *egl_attribs) bool egl_create_context(egl_ctx_data_t *egl, const EGLint *egl_attribs)
{ {
egl->ctx = eglCreateContext(egl->dpy, egl->config, EGL_NO_CONTEXT, EGLContext ctx = eglCreateContext(egl->dpy, egl->config, EGL_NO_CONTEXT,
egl_attribs); egl_attribs);
egl->hw_ctx = NULL;
if (egl->ctx == EGL_NO_CONTEXT) if (ctx == EGL_NO_CONTEXT)
return false; return false;
egl->ctx = ctx;
egl->hw_ctx = NULL;
if (egl->use_hw_ctx) if (egl->use_hw_ctx)
{ {
egl->hw_ctx = eglCreateContext(egl->dpy, egl->config, egl->ctx, egl->hw_ctx = eglCreateContext(egl->dpy, egl->config, egl->ctx,