`SDL_GetTicks()` only has millisecond resolution so switched to
`SLD_GetPerformanceCounter()` combined with
`SDL_GetPerformanceFrequency()` which should allow more granular timing
Fix: remove intermediate variable
Remove second cast
* Testing linux implementation
* Add implementation for ClipboardImage on Linux
* Adding another check to make sure that only X11 include X11 libs
* Adding some comments to explain the magic numbers
Redesigned to support disabling features on compilation with `-DSUPPORT_FEATURE=0`
REMOVED: `SUPPORT_DEFAULT_FONT`, always supported
REMOVED: `SUPPORT_IMAGE_MANIPULATION `, always supported
REMOVED: `SUPPORT_TEXT_MANIPULATION`, always supported
REDESIGNED: `SUPPORT_FONT_ATLAS_WHITE_REC` to `FONT_ATLAS_CORNER_REC_SIZE`
REVIEWED: Config values (other than 0-1) are already defined on respective modules
Other config tweaks here and there
* 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 typos preventing window from min/maxing
* fixed window style generation ignoring minimize precedence, causing errors in edge cases
* added maximize button on resizable windows
* fixed infinite loop when resizing the window manually
* activate window upon creation to set focus and show taskbar icon
* extended SanitizeFlags() to account for problematic resizing/mizing flag mixups
[utils] was created long time ago, when [rcore] contained all the platforms code, the purpose of the file was exposing basic filesystem functionality across modules and also logging mechanism but many things have changed since then and there is no need to keep using this module.
- Logging system has been move to [rcore] module and macros are exposed through `config.h` to other modules
- File system functionality has also been centralized in [rcore] module that along the years it was already adding more and more file-system functions, now they are all in the same module
- Android specific code has been moved to `rcore_android.c`, it had no sense to have specific platform code in `utils`, [rcore] is responsible of all platform code.