Refine egl_init_context - DRM EGL contexts still fails

at eglGetDisplay
This commit is contained in:
twinaphex 2017-03-30 02:31:51 +02:00
parent dd80ffc61b
commit 38f9b93885

View File

@ -213,14 +213,15 @@ bool egl_init_context(egl_ctx_data_t *egl,
EGLint *major, EGLint *minor,
EGLint *n, const EGLint *attrib_ptr)
{
NativeDisplayType display = (NativeDisplayType)display_data;
egl->dpy = eglGetDisplay(display);
if (!egl->dpy)
EGLDisplay dpy = (NativeDisplayType)eglGetDisplay(display_data);
if (dpy == EGL_NO_DISPLAY)
{
RARCH_ERR("[EGL]: Couldn't get EGL display.\n");
return false;
}
egl->dpy = dpy;
if (!eglInitialize(egl->dpy, major, minor))
return false;