- _eglLockMutex(&_eglDisplayInitMutex);
- if (_eglDisplayHash) {
- EGLuint key = _eglHashFirstEntry(_eglDisplayHash);
-
- while (key) {
- _EGLDisplay *dpy = (_EGLDisplay *)
- _eglHashLookup(_eglDisplayHash, key);
- assert(dpy);
-
- if (dpy->ContextList || dpy->SurfaceList)
- _eglLog(_EGL_DEBUG, "Display %u is destroyed with resources", key);
-
- _eglCleanupDisplay(dpy);
- free(dpy);
+ /* map --with-egl-platforms names to platform types */
+ static const struct {
+ _EGLPlatformType platform;
+ const char *name;
+ } egl_platforms[_EGL_NUM_PLATFORMS] = {
+ { _EGL_PLATFORM_WINDOWS, "gdi" },
+ { _EGL_PLATFORM_X11, "x11" },
+ { _EGL_PLATFORM_DRM, "drm" },
+ { _EGL_PLATFORM_FBDEV, "fbdev" }
+ };
+ _EGLPlatformType plat = _EGL_INVALID_PLATFORM;
+ const char *plat_name;
+ EGLint i;