1
0
mirror of synced 2024-09-24 11:38:26 +02: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)
#include <emscripten.h>
#else
#include <GLFW/glfw3.h>
#include <nfd.hpp>
#if defined(OS_WINDOWS)
#define GLFW_EXPOSE_NATIVE_WIN32
@ -36,17 +37,21 @@
#define GLFW_EXPOSE_NATIVE_COCOA
#endif
#if defined(OS_LINUX)
#if GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 4
#define GLFW_EXPOSE_NATIVE_X11
#endif
#if defined(OS_LINUX) && defined(GLFW_WAYLAND_APP_ID)
#else
#define GLFW_EXPOSE_NATIVE_WAYLAND
#endif
#endif
#include <nfd_glfw3.h>
#if defined(OS_LINUX) && defined(GLFW_WAYLAND_APP_ID)
#if defined(OS_LINUX) && GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 4
#if GLFW_VERSION_MAJOR == 3 && GLFW_VERSION_MINOR >= 4
#undef GLFW_EXPOSE_NATIVE_X11
#else
#undef GLFW_EXPOSE_NATIVE_WAYLAND
#endif
#if defined(OS_LINUX)
#undef GLFW_EXPOSE_NATIVE_X11
#endif
#if defined(OS_MACOS)
#undef GLFW_EXPOSE_NATIVE_COCOA