Jelajahi Sumber

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.
Camilla Löwy 3 tahun lalu
induk
melakukan
2efc598d70
1 mengubah file dengan 9 tambahan dan 3 penghapusan
  1. 9 3
      include/GLFW/glfw3native.h

+ 9 - 3
include/GLFW/glfw3native.h

@@ -103,17 +103,23 @@ extern "C" {
    #undef GLFW_APIENTRY_DEFINED
   #endif
   #include <windows.h>
- #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 <Cocoa/Cocoa.h>
   #else
    #include <ApplicationServices/ApplicationServices.h>
    #include <objc/objc.h>
   #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 <X11/Xlib.h>
   #include <X11/extensions/Xrandr.h>
- #elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
+ #endif
+
+ #if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
   #include <wayland-client.h>
  #endif