From 6589311a0b7a217ec270000eb3ab2a5172992efa Mon Sep 17 00:00:00 2001 From: Alexandre Almeida Date: Thu, 29 Feb 2024 14:29:32 -0300 Subject: Update GLFW to 3.4 (#3827) * Update GLFW to 3.4 (draft) * Add _glfwConnectNull() function to rglfw.c * Update rglfw.c * Update Makefile * Makefile: Replace USE_WAYLAND_DISPLAY with DISABLE_WAYLAND * Revert "Makefile: Replace USE_WAYLAND_DISPLAY with DISABLE_WAYLAND" This reverts commit 9e79abde786bf797d8133fd95e8a475cf6e2b066. * GlfwImport.cmake: Replace GLFW_USE_WAYLAND with GLFW_BUILD_WAYLAND * Update rglfw.c * Output platform selected by GLFW to TRACELOG * GLFW has removed Mir support --- src/platforms/rcore_desktop.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/platforms') diff --git a/src/platforms/rcore_desktop.c b/src/platforms/rcore_desktop.c index dbfc29e0..d4c02440 100644 --- a/src/platforms/rcore_desktop.c +++ b/src/platforms/rcore_desktop.c @@ -74,7 +74,6 @@ //#define GLFW_EXPOSE_NATIVE_X11 // WARNING: Exposing Xlib.h > X.h results in dup symbols for Font type //#define GLFW_EXPOSE_NATIVE_WAYLAND - //#define GLFW_EXPOSE_NATIVE_MIR #include "GLFW/glfw3native.h" // Required for: glfwGetX11Window() #endif #if defined(__APPLE__) @@ -1570,6 +1569,17 @@ int InitPlatform(void) CORE.Storage.basePath = GetWorkingDirectory(); //---------------------------------------------------------------------------- + char* glfwPlatform = ""; + switch (glfwGetPlatform()) + { + case GLFW_PLATFORM_WIN32: glfwPlatform = "Win32"; break; + case GLFW_PLATFORM_COCOA: glfwPlatform = "Cocoa"; break; + case GLFW_PLATFORM_WAYLAND: glfwPlatform = "Wayland"; break; + case GLFW_PLATFORM_X11: glfwPlatform = "X11"; break; + case GLFW_PLATFORM_NULL: glfwPlatform = "Null"; break; + } + + TRACELOG(LOG_INFO, "GLFW platform: %s", glfwPlatform); TRACELOG(LOG_INFO, "PLATFORM: DESKTOP (GLFW): Initialized successfully"); return 0; -- cgit v1.2.3