Mesa (master): egl: warn user if they set an invalid EGL_PLATFORM

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 3 13:42:09 UTC 2019


Module: Mesa
Branch: master
Commit: 5f7d90f2ffb3cc6f2c9518870da9009b05c1a063
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5f7d90f2ffb3cc6f2c9518870da9009b05c1a063

Author: Eric Engestrom <eric.engestrom at intel.com>
Date:   Mon Sep  2 10:09:58 2019 +0100

egl: warn user if they set an invalid EGL_PLATFORM

Technically, the user might have set EGL_DISPLAY instead of
EGL_PLATFORM, but since the former is deprecated let's just mention the
latter in the warning message.

Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

---

 src/egl/main/egldisplay.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 05720015c24..8d06e717c20 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -105,6 +105,9 @@ _eglGetNativePlatformFromEnv(void)
       }
    }
 
+   if (plat == _EGL_INVALID_PLATFORM)
+      _eglLog(_EGL_WARNING, "invalid EGL_PLATFORM given");
+
    return plat;
 }
 




More information about the mesa-commit mailing list