From 6274ca4266670fc4297b0377579978157098bbe9 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 15 Sep 2025 19:28:01 +0200 Subject: [PATCH] Backends: GLFW: fixed build for Emscripten which doesn't expose glfw3native.h. Amend 10d0162 --- backends/imgui_impl_glfw.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backends/imgui_impl_glfw.cpp b/backends/imgui_impl_glfw.cpp index 42e02ccc8..8a646b5dd 100644 --- a/backends/imgui_impl_glfw.cpp +++ b/backends/imgui_impl_glfw.cpp @@ -110,10 +110,12 @@ #ifndef GLFW_EXPOSE_NATIVE_WIN32 // for glfwGetWin32Window() #define GLFW_EXPOSE_NATIVE_WIN32 #endif +#include #elif defined(__APPLE__) #ifndef GLFW_EXPOSE_NATIVE_COCOA // for glfwGetCocoaWindow() #define GLFW_EXPOSE_NATIVE_COCOA #endif +#include #elif !defined(__EMSCRIPTEN__) #ifndef GLFW_EXPOSE_NATIVE_X11 // for glfwGetX11Window() on Freedesktop (Linux, BSD, etc.) #define GLFW_EXPOSE_NATIVE_X11 @@ -121,8 +123,8 @@ #ifndef GLFW_EXPOSE_NATIVE_WAYLAND #define GLFW_EXPOSE_NATIVE_WAYLAND #endif -#endif #include +#endif #undef Status // X11 headers are leaking this. #ifndef _WIN32 #include // for usleep()