mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-05 17:46:30 +00:00
Backends: GLFW: fixed build on platform that are neither Windows, macOS or known Unixes. (#8969, #8920, #8921)
Fix 10d0162
.
x
This commit is contained in:
@@ -105,6 +105,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// GLFW
|
// GLFW
|
||||||
|
#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
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#undef APIENTRY
|
#undef APIENTRY
|
||||||
@@ -117,8 +122,8 @@
|
|||||||
#define GLFW_EXPOSE_NATIVE_COCOA
|
#define GLFW_EXPOSE_NATIVE_COCOA
|
||||||
#endif
|
#endif
|
||||||
#include <GLFW/glfw3native.h>
|
#include <GLFW/glfw3native.h>
|
||||||
#elif !defined(__EMSCRIPTEN__)
|
#elif GLFW_HAS_X11_OR_WAYLAND
|
||||||
#ifndef GLFW_EXPOSE_NATIVE_X11 // for glfwGetX11Window() on Freedesktop (Linux, BSD, etc.)
|
#ifndef GLFW_EXPOSE_NATIVE_X11 // for glfwGetX11Display(), glfwGetX11Window() on Freedesktop (Linux, BSD, etc.)
|
||||||
#define GLFW_EXPOSE_NATIVE_X11
|
#define GLFW_EXPOSE_NATIVE_X11
|
||||||
#endif
|
#endif
|
||||||
#ifndef GLFW_EXPOSE_NATIVE_WAYLAND
|
#ifndef GLFW_EXPOSE_NATIVE_WAYLAND
|
||||||
@@ -154,11 +159,6 @@
|
|||||||
#define GLFW_HAS_GETKEYNAME (GLFW_VERSION_COMBINED >= 3200) // 3.2+ glfwGetKeyName()
|
#define GLFW_HAS_GETKEYNAME (GLFW_VERSION_COMBINED >= 3200) // 3.2+ glfwGetKeyName()
|
||||||
#define GLFW_HAS_GETERROR (GLFW_VERSION_COMBINED >= 3300) // 3.3+ glfwGetError()
|
#define GLFW_HAS_GETERROR (GLFW_VERSION_COMBINED >= 3300) // 3.3+ glfwGetError()
|
||||||
#define GLFW_HAS_GETPLATFORM (GLFW_VERSION_COMBINED >= 3400) // 3.4+ glfwGetPlatform()
|
#define GLFW_HAS_GETPLATFORM (GLFW_VERSION_COMBINED >= 3400) // 3.4+ glfwGetPlatform()
|
||||||
#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
|
|
||||||
|
|
||||||
// Map GLFWWindow* to ImGuiContext*.
|
// Map GLFWWindow* to ImGuiContext*.
|
||||||
// - Would be simpler if we could use glfwSetWindowUserPointer()/glfwGetWindowUserPointer(), but this is a single and shared resource.
|
// - Would be simpler if we could use glfwSetWindowUserPointer()/glfwGetWindowUserPointer(), but this is a single and shared resource.
|
||||||
|
@@ -77,6 +77,8 @@ Other Changes:
|
|||||||
of recreating them each time. (#8963, #8465) [@RT2Code]
|
of recreating them each time. (#8963, #8465) [@RT2Code]
|
||||||
- Backends: OpenGL3: fixed GL loader to work on Haiku OS which does not support
|
- Backends: OpenGL3: fixed GL loader to work on Haiku OS which does not support
|
||||||
`RTLD_NOLOAD`. (#8952) [@Xottab-DUTY, @threedeyes]
|
`RTLD_NOLOAD`. (#8952) [@Xottab-DUTY, @threedeyes]
|
||||||
|
- Backends: GLFW: fixed build on platform that are neither Windows, macOS or
|
||||||
|
known Unixes (Regression in 1.92.3). (#8969, #8920, #8921) [@oktonion]
|
||||||
- Backends: SDL2,SDL3: avoid using the SDL_GetGlobalMouseState() path when one of our
|
- Backends: SDL2,SDL3: avoid using the SDL_GetGlobalMouseState() path when one of our
|
||||||
window is hovered, as the event data is reliable and enough in this case.
|
window is hovered, as the event data is reliable and enough in this case.
|
||||||
- Fix mouse coordinates issue in fullscreen apps with macOS notch. (#7919, #7786)
|
- Fix mouse coordinates issue in fullscreen apps with macOS notch. (#7919, #7786)
|
||||||
|
Reference in New Issue
Block a user