Repository navigation
Conversation
|
Thank you! Could you clarify which platform/sdk you are using where the assumption was not correct? |
|
Does it work if you replace the code with: #elif !defined(__EMSCRIPTEN__) && GLFW_HAS_X11_OR_WAYLAND |
Obviously it will not work because If we'll rearrange defines so ...
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
#define GLFW_HAS_X11_OR_WAYLAND 1
#else
#define GLFW_HAS_X11_OR_WAYLAND 0
#endif
...
// GLFW
#include <GLFW/glfw3.h>
#ifdef _WIN32
#undef APIENTRY
#ifndef GLFW_EXPOSE_NATIVE_WIN32 // for glfwGetWin32Window()
#define GLFW_EXPOSE_NATIVE_WIN32
...
#elif !defined(__EMSCRIPTEN__) && GLFW_HAS_X11_OR_WAYLAND
#ifndef GLFW_EXPOSE_NATIVE_X11 // for glfwGetX11Window() on Freedesktop (Linux, BSD, etc.)
#define GLFW_EXPOSE_NATIVE_X11
#endif
#ifndef GLFW_EXPOSE_NATIVE_WAYLAND
#define GLFW_EXPOSE_NATIVE_WAYLAND
#endif
#include <GLFW/glfw3native.h>
#endif
...
#if !GLFW_HAS_X11_OR_WAYLAND
return false;
#elif GLFW_HAS_GETPLATFORM
...then yes. P.S. Also I don't know why misleading comment like |
|
Thanks, I'll push the fix soon.
The |
…rs are not available. (ocornut#9024, ocornut#8969, ocornut#8921, ocornut#8920)
…LFW_DISABLE_WAYLAND automatically if headers are not available. (ocornut#9225) Amend/fix 10d0162 for system without X11/Wayland headers. (ocornut#8921, ocornut#8920, ocornut#8969)
Quick fix for recently added GLFW ...EXPOSE_NATIVE... defines to access internals of X11 and Wayland platforms (bad design decision in the first place but whatever).
Just check for if not windows or apple and
!defined(__EMSCRIPTEN__)is not enough to assume that platform has X11 or Wayland.PR adds checks for unix or linux OS defines to ensure back-end may access GLFW internals for these platforms.