diff --git a/README.md b/README.md index a7aa04fa..98239920 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,7 @@ information on what to include when reporting a bug. - [Win32] Bugfix: Monitor events were not emitted (#784) - [Win32] Bugfix: The Cygwin DLL was installed to the wrong directory (#1035) - [Win32] Bugfix: Normalization of axis data via XInput was incorrect (#1045) +- [Win32] Bugfix: `glfw3native.h` would undefine a foreign `APIENTRY` (#1062) - [X11] Moved to XI2 `XI_RawMotion` for disable cursor mode motion input (#125) - [X11] Replaced `_GLFW_HAS_XF86VM` compile-time option with dynamic loading - [X11] Bugfix: `glfwGetVideoMode` would segfault on Cygwin/X diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 1eb5131c..05e76a9a 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -105,6 +105,7 @@ extern "C" { #else #define APIENTRY #endif + #define GLFW_APIENTRY_DEFINED #endif /* APIENTRY */ /* Some Windows OpenGL headers need this. diff --git a/include/GLFW/glfw3native.h b/include/GLFW/glfw3native.h index ad7ccb57..4372cb76 100644 --- a/include/GLFW/glfw3native.h +++ b/include/GLFW/glfw3native.h @@ -86,7 +86,10 @@ extern "C" { // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for // example to allow applications to correctly declare a GL_ARB_debug_output // callback) but windows.h assumes no one will define APIENTRY before it does - #undef APIENTRY + #if defined(GLFW_APIENTRY_DEFINED) + #undef APIENTRY + #undef GLFW_APIENTRY_DEFINED + #endif #include #elif defined(GLFW_EXPOSE_NATIVE_COCOA) #include