summaryrefslogtreecommitdiffhomepage
path: root/BUILDING.md
AgeCommit message (Collapse)Author
2026-06-29fix: switch desktop window backend GLFW -> SDL2 (reliable drag-and-drop)Adam Malczewski
The GLFW Wayland drag-and-drop crash fix (previous commit) did NOT resolve drag-and-drop on the real target (labwc), so abandon the GLFW path entirely instead of patching it further. Why SDL: raylib ships a first-class SDL backend (PLATFORM_DESKTOP_SDL) that implements file drop via SDL_DROPFILE. GLFW 3.4 (vendored in raylib 6.0) has broken Wayland drag-and-drop (wl_data_offer NULL source_actions/action listeners -> libwayland wl_abort on drag, glfw/glfw#2835) AND its X11 backend segfaults on WSLg (Mesa GLX). SDL's window/EGL/drag-drop is mature on BOTH real Wayland (labwc) and WSLg, so one backend covers both targets with no vendor patches and no X11/Wayland special-casing. Changes (desktop only; web build stays Emscripten+GLFW, untouched): - build.zig: build raylib PLATFORM=PLATFORM_DESKTOP_SDL (SDL_INCLUDE_PATH/ LIBRARY_PATH = system SDL2); link SDL2 instead of wayland-*/xkbcommon/EGL. - Revert the GLFW patch (patches/glfw-wayland-dnd-crash.patch removed; the build.zig patch-application step removed). - Docs: environment.md / study-player.md / BUILDING.md / SCREENSHOT.md updated to reflect the SDL backend + the SDL2 system dependency. The RmlUi binding is backend-agnostic (rlgl render + raylib IsKeyDown input, zero glfw* calls), so the swap is transparent to it. Prerequisite on the cyberdeck: install SDL2 dev (sudo pacman -S sdl2 or sdl2-compat) before building. Verified on the laptop (WSLg): build green; binary runs under SDL (Platform backend: DESKTOP (SDL)), window opens, no GLX segfault, RmlUi fonts load, mp3 loads from argv (132300 frames), no crash. Interactive drag-drop itself still needs user testing on the cyberdeck (SDL_DROPFILE path).
2026-06-28import template from raylib-jamstackAdam Malczewski