From 1fe29e2c19d6370fa054bb1de3d87fd1f4b6ec42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 26 Jul 2022 19:21:07 +0200 Subject: [PATCH] Fix native access macros being mutually exclusive The documentation was updated with the introduction of run-time platform selection, but the preprocessor logic was not. (cherry picked from commit 2efc598d70be92267a97c95ac08668565784ab19) --- include/GLFW/glfw3native.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/GLFW/glfw3native.h b/include/GLFW/glfw3native.h index 7be0227d..7e093899 100644 --- a/include/GLFW/glfw3native.h +++ b/include/GLFW/glfw3native.h @@ -103,17 +103,23 @@ extern "C" { #undef GLFW_APIENTRY_DEFINED #endif #include - #elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL) + #endif + + #if defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL) #if defined(__OBJC__) #import #else #include #include #endif - #elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX) + #endif + + #if defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX) #include #include - #elif defined(GLFW_EXPOSE_NATIVE_WAYLAND) + #endif + + #if defined(GLFW_EXPOSE_NATIVE_WAYLAND) #include #endif