summaryrefslogtreecommitdiffhomepage
path: root/src/rglfw.c
diff options
context:
space:
mode:
authorAlexandre Almeida <[email protected]>2024-03-14 12:54:39 -0300
committerGitHub <[email protected]>2024-03-14 16:54:39 +0100
commit9a8d73e6c32514275a0ba53fe528bcb7c2693e27 (patch)
tree9563c5000626b6e487fbccf439c9b71e7125e8cc /src/rglfw.c
parent42db6badd0848109746d6186792cf6a60363d7b3 (diff)
downloadraylib-9a8d73e6c32514275a0ba53fe528bcb7c2693e27.tar.gz
raylib-9a8d73e6c32514275a0ba53fe528bcb7c2693e27.zip
Fix GLFW runtime platform detection (#3863)
* Fix GLFW runtime platform detection * Add libwayland-dev package to workflows * Add libxkbcommon-dev package to workflows * Add libwayland-bin package to codeql.yml * Add libwayland-client0 and libwayland-cursor0 packages to codeql.yml * Use libwayland-dev in codeql.yml * Add libxkbcommon-dev to codeql.yml * Remove libwayland-bin from linux.yml and linux_examples.yml (libwayland-dev includes it as a dependency) --------- Co-authored-by: Ray <[email protected]>
Diffstat (limited to 'src/rglfw.c')
-rw-r--r--src/rglfw.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/rglfw.c b/src/rglfw.c
index 5c2720b1..2282955a 100644
--- a/src/rglfw.c
+++ b/src/rglfw.c
@@ -35,7 +35,7 @@
// _GLFW_WAYLAND to use the Wayland API (experimental and incomplete)
// _GLFW_COCOA to use the Cocoa frameworks
//
-// Note: GLFW's runtime platform selection is not supported at the moment
+// On Linux, _GLFW_X11 and _GLFW_WAYLAND can be combined
//----------------------------------------------------------------------------------
// Feature Test Macros required for this module
@@ -53,8 +53,8 @@
#define _GLFW_WIN32
#endif
#if defined(__linux__)
- #if !defined(_GLFW_WAYLAND) // Required for Wayland windowing
- #define _GLFW_X11
+ #if !defined(_GLFW_WAYLAND) && !defined(_GLFW_X11)
+ #error "Cannot disable Wayland and X11 at the same time"
#endif
#endif
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
@@ -69,15 +69,6 @@
#define _WIN32_WINNT_WINXP 0x0501
#endif
-#include "external/glfw/src/internal.h"
-
-// We do not use GLFW's "null" platform, but the absence of this function
-// causes the build to fail
-GLFWbool _glfwConnectNull(int platformID, _GLFWplatform* platform)
-{
- return GLFW_TRUE;
-}
-
// Common modules to all platforms
#include "external/glfw/src/init.c"
#include "external/glfw/src/platform.c"