From 5f7d90f2ffb3cc6f2c9518870da9009b05c1a063 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Mon, 2 Sep 2019 10:09:58 +0100 Subject: [PATCH] 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 Reviewed-by: Lionel Landwerlin --- 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; } -- 2.30.2