egl: warn user if they set an invalid EGL_PLATFORM
authorEric Engestrom <eric.engestrom@intel.com>
Mon, 2 Sep 2019 09:09:58 +0000 (10:09 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Tue, 3 Sep 2019 13:41:43 +0000 (14:41 +0100)
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@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/egl/main/egldisplay.c

index 05720015c245c6410e4ad6eff57bff6daabf4009..8d06e717c20fe6d52344a16396c0503f3abef141 100644 (file)
@@ -105,6 +105,9 @@ _eglGetNativePlatformFromEnv(void)
       }
    }
 
+   if (plat == _EGL_INVALID_PLATFORM)
+      _eglLog(_EGL_WARNING, "invalid EGL_PLATFORM given");
+
    return plat;
 }