Replace the use of _eglPreloadDriver by _eglPreloadDrivers. The latter
supports EGL_DISPLAY which have a better chance to "just work".
drv = disp->Driver;
if (!drv) {
+ _eglPreloadDrivers();
+
drv = _eglOpenDriver(disp);
if (!drv)
return _eglError(EGL_NOT_INITIALIZED, __FUNCTION__);
}
}
- /* preload a driver if there isn't one */
- if (!_eglGlobal.NumDrivers)
- _eglPreloadDriver(NULL);
+ _eglPreloadDrivers();
/* now loop over drivers to query their procs */
for (i = 0; i < _eglGlobal.NumDrivers; i++) {
_EGLDisplay *dpy = (_EGLDisplay *) calloc(1, sizeof(_EGLDisplay));
if (dpy) {
dpy->NativeDisplay = nativeDisplay;
-
- dpy->DriverName = _eglPreloadDriver(dpy);
- if (!dpy->DriverName) {
- free(dpy);
- return NULL;
- }
}
return dpy;
}