1
0
mirror of synced 2024-11-12 02:00:52 +01:00

fix: Allow ImHex to build under wayland again

This commit is contained in:
WerWolv 2024-07-24 19:41:34 +02:00
parent 416889f49d
commit 48fc1a7a1e

View File

@ -23,6 +23,7 @@
#if defined(OS_WEB) #if defined(OS_WEB)
#include <emscripten.h> #include <emscripten.h>
#else #else
#include <GLFW/glfw3.h>
#include <nfd.hpp> #include <nfd.hpp>
#if defined(OS_WINDOWS) #if defined(OS_WINDOWS)
#define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WIN32
@ -36,17 +37,21 @@
#define GLFW_EXPOSE_NATIVE_COCOA #define GLFW_EXPOSE_NATIVE_COCOA
#endif #endif
#if defined(OS_LINUX) #if defined(OS_LINUX)
#define GLFW_EXPOSE_NATIVE_X11 #if GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 4
#endif #define GLFW_EXPOSE_NATIVE_X11
#if defined(OS_LINUX) && defined(GLFW_WAYLAND_APP_ID) #else
#define GLFW_EXPOSE_NATIVE_WAYLAND #define GLFW_EXPOSE_NATIVE_WAYLAND
#endif
#endif #endif
#include <nfd_glfw3.h> #include <nfd_glfw3.h>
#if defined(OS_LINUX) && defined(GLFW_WAYLAND_APP_ID)
#undef GLFW_EXPOSE_NATIVE_WAYLAND #if defined(OS_LINUX) && GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 4
#endif #if GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 4
#if defined(OS_LINUX) #undef GLFW_EXPOSE_NATIVE_X11
#undef GLFW_EXPOSE_NATIVE_X11 #else
#undef GLFW_EXPOSE_NATIVE_WAYLAND
#endif
#endif #endif
#if defined(OS_MACOS) #if defined(OS_MACOS)
#undef GLFW_EXPOSE_NATIVE_COCOA #undef GLFW_EXPOSE_NATIVE_COCOA