From 7c1498daba053b8d05dba1216f0e308b30076375 Mon Sep 17 00:00:00 2001 From: Erico Nunes Date: Fri, 27 May 2022 20:54:40 +0200 Subject: [PATCH] egl: Fix DETECT_OS macro usage As described in src/util/detect_os.h, the DETECT_OS macros are always defined to a 0 or 1 value, and they should be used with #if rather than #ifdef. Commit 54b7227f158 accidentally disabled those extensions on all platforms, so enable them again. Fixes: 54b7227f158 ("egl/wgl: On win32, there is no support for EGL_EXT_device and EGL_EXT_platform_device") Signed-off-by: Erico Nunes Reviewed-by: Jesse Natalie Acked-by: Yonggang Luo Part-of: --- src/egl/main/eglglobals.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/main/eglglobals.c b/src/egl/main/eglglobals.c index ebf7c573509..36213a28cc1 100644 --- a/src/egl/main/eglglobals.c +++ b/src/egl/main/eglglobals.c @@ -67,7 +67,7 @@ struct _egl_global _eglGlobal = .ClientExtensionString = #endif "EGL_EXT_client_extensions" -#ifndef DETECT_OS_WINDOWS +#if !DETECT_OS_WINDOWS " EGL_EXT_device_base" " EGL_EXT_device_enumeration" " EGL_EXT_device_query" @@ -83,7 +83,7 @@ struct _egl_global _eglGlobal = " " #endif -#ifndef DETECT_OS_WINDOWS +#if !DETECT_OS_WINDOWS "EGL_EXT_platform_device" #endif #ifdef HAVE_WAYLAND_PLATFORM