Commit Graph
344 Commits
Author SHA1 Message Date
Alvin De Cruz 5e14ac5a2e #5387 - Fix keyboard input detected as gamepad on some Android devices (#5439)
* [rcore][android] Fix keyboard input detected as gamepad on some devices (#5387)

* [core] Add keyboard vs gamepad input test example (#5387)
2025-12-26 20:42:32 +01:00
Ray 20dd4641c8 REVIEWED: Potential security concerns while copying unbounded text data between strings
Note that issue has been reported by CodeQL static analysis system
2025-12-24 19:35:06 +01:00
Ray 9103f6e055 ADDED: New platform backend for Web: Emscripten, not dependant on GLFW.js -WIP- 2025-12-24 18:58:20 +01:00
Krzysztof Szenk a1e84caa8c RGFW also requires RGBA8 images as window icons, as raylib already reports in raylib.h (#5431) 2025-12-24 09:04:41 +01:00
caszu 6a701b2679 fix android SetWindowState (#5424) 2025-12-23 15:37:08 +01:00
Ray aa2884bd78 Update rcore_desktop_glfw.c 2025-12-22 22:50:38 +01:00
Ray f27f2d097f REVIEWED: HighDPI support on macOS (when requested by app)
Tested on two monitors with different DPI configuration, for HigDPI enabled and not, including window resizing (with framebuffer resizing if required). Verified mouse coordinates follow the requested screen size.
2025-12-22 22:48:08 +01:00
Ray 8516750975 Remove internal function 2025-12-22 20:29:57 +01:00
Ray 13f9112d8c Update rcore_desktop_sdl.c 2025-12-19 01:16:34 +01:00
Ray f16fb065ea Update rcore_template.c 2025-12-19 01:15:34 +01:00
Ray 4b760091da REVIEWED: Window scaling with HighDPI on macOS #5059 2025-12-17 21:23:25 +01:00
Ray 6d562e5e87 REVIEWED: HiggDPI content scaling on changing monitors with different DPI #5335 #5356
Note that high-dpi awareness must be enabled by users and `CORE.Window.render` reports the scaled framebuffer size, while `CORE.Window.screen` reports the logical size.

`ToggleBorderlessWindow()` has also been reviewed to be consistent with scaling, if monitor physical display size is reported as 1920x1080 but there is a content scale of 1.5, then the borderless fullscreen window will be 1280x720, with the 1920x1080 framebuffer
2025-12-17 19:20:18 +01:00
Ray 7553e9d586 REVIEWED: Gamepads on latest SDL2 2.32.8 and SDL3 3.3.6 #5403 2025-12-16 19:36:01 +01:00
Ray 7a5e8aa3a5 Update rcore_android.c 2025-12-16 18:30:33 +01:00
caszu 1c94e94873 [rcore] Implement FLAG_WINDOW_ALWAYS_RUN on Android (#5414) 2025-12-16 18:26:20 +01:00
Ray f031b2f4f4 Alignment with other platform backends, avoid unneeded includes 2025-12-16 18:20:02 +01:00
Ray 1c7240a01d Revert "REVIEWED: Alignment with other platforms"
This reverts commit cf0d6fc664.
2025-12-16 18:18:42 +01:00
Ray cf0d6fc664 REVIEWED: Alignment with other platforms 2025-12-15 20:44:28 +01:00
Ray 9a337f3b3b ADDED: Support software renderer on Web, blitting framebuffer data directly to a 2d canvas
This improvement is just a prove of concept, at this moment `PLATFORM_WEB` is limited in terms of software rendering by `GLFW` that only allows creating a WebGL canvas context with `glfwCreateWindow()`.

We can skip that call but then some GLFW functionality is not available (windowing, inputs). The best solution is replacing GLFW completely by a pure Emscripten implementation for `PLATFORM_WEB`.
2025-12-14 19:52:18 +01:00
Ray 5025009860 REVIEWED: Make sure all variables are initialized on definition, prioritize one line per variable definitions 2025-12-14 19:45:28 +01:00
Ray c96669e123 REVIEWED: Webpage reference comments starting with REF:, more consistent with TODO: and NOTE: comments 2025-12-13 13:03:41 +01:00
Ray 9c04b1de82 REVIEWED: Store canvas name id at platform initialization
Useful to support multiple canvases running different wasm instances in same webpage
2025-12-13 11:58:04 +01:00
Ray 2853b28d6d REVIEWED: Avoid program crash if GPU data is tried to be loaded before InitWindow() #4751
Following raylib design, a warning log message is shown and program can continue execution.
Some early return checks have been added on most  critical functions.
[rtext] Previous implementation checking `isGpuReady` cross-module variable is not needed any more, resulting in a more decoupled code, load failure is managed at rlgl level
2025-12-11 18:21:57 +01:00
Aly 78a81bf407 Fix ToggleBorderlessFullscreen() Not Hiding Taskbar (#5383)
* Use glfwSetWindowMonitor instead of Pos and Size GLFW functions

* Fix window not resetting properly when toggling out of fullscreen, formatting
2025-12-02 22:55:22 +01:00
Connor O'Connor 1bbc8682f4 Fixed some typos and mispellings (#5381)
Specifically "occured" -> "occurred"
2025-12-02 22:48:06 +01:00
Ray ebce9fa97a Update rcore_memory.c 2025-11-29 20:01:44 +01:00
Ray 18e1ec504f Updated example 2025-11-29 18:20:06 +01:00
Ray 47a8b554bc **NEW**: PLATFORM_MEMORY backend
New platform backend for software rendering directly on RAM memory buffer
2025-11-24 15:38:58 +01:00
Ray bd36610f91 Some formatting 2025-11-24 15:37:28 +01:00
Ray e1b9857b14 Some TODOs and format reviews 2025-11-23 21:40:39 +01:00
Ray f1719480e0 Minor format tweaks 2025-11-23 13:21:31 +01:00
Jeffery Myers 90af210712 include malloc.h so the win32 platform can build in MSVC (#5365) 2025-11-20 08:00:23 +01:00
Ray d26435703f Update rcore_desktop_win32.c 2025-11-19 13:18:13 +01:00
Ray 86e00bde65 Update rcore_desktop_sdl.c 2025-11-18 16:30:48 +01:00
MikiZX1 b18f547d8f Update rcore_desktop_sdl.c, fix crash when strncpy tries to copy using NULL pointer (#5359)
When SDL_GameControllerNameForIndex returns null, the app crashes. This was addressed earlier in PR#4859 though the fix submitted on PR #4859 was only fixing the crashing and not addressing the root cause.
2025-11-18 16:19:07 +01:00
Serhii Zasenko be9a24e68c Fix controller not available right after win init (#5358)
- Fix IsGamepadAvailable() returns false for an available controller immediately after window initialization
2025-11-18 16:17:58 +01:00
Ray fcaea5b1a1 Remove trailing spaces 2025-11-11 17:39:53 +01:00
JohnnyCena123 12ce106661 [rcore][glfw] fix IsWindowFocused() inverted logic (#5333) 2025-11-04 18:17:37 +01:00
NoNameAuthenticated e92832fc6d Update rcore_desktop_sdl.c (#5332) 2025-11-04 17:50:54 +01:00
Ray cfb43fa999 Update rcore_desktop_sdl.c 2025-11-03 09:45:18 +01:00
komunre ed68a4fcce Fixed bugs in SDL backend (#5325) 2025-11-03 09:43:20 +01:00
Tiago Ferreira cc83b2bd8e fix: cursor lock/unlock inconsistent behaviour on glfw, rgfw, sl (#5323) 2025-11-02 19:46:57 +01:00
Ray 3cf3b309c6 REVIEWED: Flags set/clear #5169 2025-11-02 19:40:45 +01:00
JohnnyCena123andRay 5fbf67a630 [rcore] Use FLAG_* macros where possible (#5169)
* use FLAG_* macros where possible

* rename `FLAG_CHECK()` to `FLAG_IS_SET()`

* remove unnecessary equality checks

* fix issues

---------

Co-authored-by: Ray <raysan5@gmail.com>
2025-11-02 19:24:47 +01:00
Le Juez Victor cbff0fa22c [rlsw] Fix axis aligned quad detection (#5314)
* fix `sw_quad_is_axis_aligned`

* align fix

* remove swGetColorBuffer and tweak DRM

* review alignment
2025-10-28 23:50:04 +01:00
Ray 0fbc4272d0 Remove trailing spaces 2025-10-26 18:22:23 +01:00
Jeffery Myers 4bb8c89084 Don't undefine the versions of LoadImage that don't conflict with raylib so that the Win32 platform can use them. (#5299) 2025-10-25 09:49:31 +02:00
sleeptightAnsiC 1b5a14e516 [rcore_desktop_sdl] fix: handle monitor ID correctly on SDL3 (#5290)
SDL3 uses ID when dealing with monitors, unlike SDL2 which uses Index
for the same thing. This problem was already fixed in multiple places
by use of preprocessor branches, so I did the very same thing.

Please, notice that this is a pretty bad solution to this problem,
and I only did it to keep it consistent with the rest of the code.
The more about why it's not correct is mentioned here:
https://github.com/raysan5/raylib/issues/5256#issuecomment-3429156919
Hopefully, someone will refactor it someday :)

Fixes: https://github.com/raysan5/raylib/issues/5256
2025-10-21 22:07:04 +02:00
Ray 99ed814615 Update rcore_desktop_win32.c 2025-10-21 20:07:42 +02:00
Ray 77b9214575 Update rcore_desktop_sdl.c 2025-10-21 20:07:32 +02:00