From 543d660ccca4c444dbbe8f71d4054a66e4914268 Mon Sep 17 00:00:00 2001 From: Quantum Date: Wed, 27 Jan 2021 23:48:59 -0500 Subject: [PATCH] [client] wayland: check for the Wayland platform extension We used to test for the EGL_KHR_platform_base and EGL_EXT_platform_base, but those only really signal the availability of eglGetPlatformDisplay(EXT) functions, not whether the constant EGL_PLATFORM_WAYLAND_KHR or EGL_PLATFORM_WAYLAND_EXT is accepted by their respective functions. Instead, we switch to test for the extensions that tells us whether the Wayland platform is supported. --- client/displayservers/Wayland/wayland.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/displayservers/Wayland/wayland.c b/client/displayservers/Wayland/wayland.c index a6f89d64..da651a81 100644 --- a/client/displayservers/Wayland/wayland.c +++ b/client/displayservers/Wayland/wayland.c @@ -639,14 +639,14 @@ static EGLDisplay waylandGetEGLDisplay(void) const char *early_exts = eglQueryString(NULL, EGL_EXTENSIONS); - if (strstr(early_exts, "EGL_KHR_platform_base") != NULL && + if (strstr(early_exts, "EGL_KHR_platform_wayland") != NULL && g_egl_dynProcs.eglGetPlatformDisplay) { DEBUG_INFO("Using eglGetPlatformDisplay"); return g_egl_dynProcs.eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_KHR, native, NULL); } - if (strstr(early_exts, "EGL_EXT_platform_base") != NULL && + if (strstr(early_exts, "EGL_EXT_platform_wayland") != NULL && g_egl_dynProcs.eglGetPlatformDisplayEXT) { DEBUG_INFO("Using eglGetPlatformDisplayEXT");