forked from enlightenment/efl
Evas GL: Don't call eglMakeCurrent if already null
If the current context & surface are already null, avoid calling eglMakeCurrent again, since it can return an error (EGL_FALSE but with no error code, thanks Nvidia).
This commit is contained in:
parent
261f083c4e
commit
079436d4f1
|
@ -179,6 +179,10 @@ evgl_eng_make_current(void *data, void *surface, void *context, int flush)
|
|||
|
||||
if ((!context) && (!surface))
|
||||
{
|
||||
if (!eglGetCurrentContext() &&
|
||||
!eglGetCurrentSurface(EGL_READ) &&
|
||||
!eglGetCurrentSurface(EGL_DRAW))
|
||||
return 1;
|
||||
ret = eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
if (!ret)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue