diff options
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r-- | src/egl/main/eglapi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index eaee9facd82..f0a6f7f9355 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -51,9 +51,12 @@ eglGetDisplay(NativeDisplayType nativeDisplay) { _EGLDisplay *dpy; _eglInitGlobals(); - dpy = _eglNewDisplay(nativeDisplay); - if (dpy) - _eglLinkDisplay(dpy); + dpy = _eglFindDisplay(nativeDisplay); + if (!dpy) { + dpy = _eglNewDisplay(nativeDisplay); + if (dpy) + _eglLinkDisplay(dpy); + } return _eglGetDisplayHandle(dpy); } |