* Fix window scaling on Wayland with GLFW 3.4+ display scaling
GLFW 3.4 defaults GLFW_SCALE_FRAMEBUFFER to TRUE on all platforms,
causing framebuffer/window size mismatch on Wayland with display
scaling (content renders in a subset of the window, mouse coordinates
are wrong).
Three fixes:
- Disable GLFW_SCALE_FRAMEBUFFER on Wayland when FLAG_WINDOW_HIGHDPI
is not set, restoring 1:1 window-to-framebuffer mapping
- With FLAG_WINDOW_HIGHDPI, read actual framebuffer size from GLFW
instead of resizing the window (which double-scales on Wayland
where GLFW_SCALE_TO_MONITOR has no effect)
- Skip mouse coordinate scaling on Wayland since GLFW already reports
coordinates in logical (window) space
Tested on NixOS/Niri with GLFW 3.4 at 1x, 1.5x, and 2x scaling.
Fixes#5504
* Fix fullscreen and borderless windowed scaling on Wayland with HiDPI
ToggleFullscreen and ToggleBorderlessWindowed exit paths manually
scale screen size by DPI before passing to glfwSetWindowMonitor,
which double-scales on Wayland where GLFW_SCALE_FRAMEBUFFER already
handles it. Skip the manual resize on Wayland.
Also fix FramebufferSizeCallback fullscreen branch: on Wayland with
GLFW_SCALE_FRAMEBUFFER the framebuffer is still scaled in fullscreen,
so use the logical window size as screen size and derive screenScale
from the framebuffer/window ratio.
Fixes#5504
* Apply style fixes from code review: remove duplicate screenScale assignment, collapse single-statement ifs to one line, remove trailing periods from comments
* fixed build errors with zig. now compatible with zig master 0.16.0-dev.1593+c13857e50. still backwards compatible with 0.15.1
* [build] building with zig-master 0.16.0-dev.2349+204fa8959.
* [build] building with zig-master 0.16.0-dev.2349+204fa8959, now compatible with zig 0.15
* build: removed compatibility with zig 0.15.2.
* inlined processExample function to minimize diffs
* Fix out of bounds Memory read in Material.Maps by using the MATERIAL_MAP_SPECULAR define instead of the SHADER_LOG_SPECULAR enum
* Fix out of bounds Memory read in Material.Maps by using the MATERIAL_MAP_SPECULAR define instead of the SHADER_LOG_SPECULAR enum