mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
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 <raysan5@gmail.com>
This commit is contained in:
committed by
GitHub
parent
42db6badd0
commit
9a8d73e6c3
15
src/rglfw.c
15
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"
|
||||
|
||||
Reference in New Issue
Block a user