Commit Graph

457 Commits

Author SHA1 Message Date
rvnfml 796e1ad22a Use CORE.Input.Keyboard.exitKey instead of KEY_ESCAPE (#5911)
... in rcore_desktop_win32 when handling window closing
2026-06-06 22:25:48 +02:00
Ray 2c690425c9 Reviewed comments, remove article usage 2026-06-03 21:02:59 +02:00
Ray 2ee6a76464 REVIEWED: GetWindowHandle(), to be consistent between backends, fix #5885
Returns the underlying window handle for platforms with some windowing system.
2026-05-30 12:20:58 +02:00
Alexandre Almeida f0d3e9a5c8 Security fixes (rcore_desktop_win32.c) (#5899)
* Security fixes in rcore_desktop_win32.c

* Avoid calling strlen() twice
2026-05-30 08:49:34 +02:00
Vasilis Narain 7b96144716 [rcore] GetCurrentMonitor(), fix for integer overflow in distance calculation (#5842)
* Fix signed integer overflow in GetCurrentMonitor distance calc

* Revert "Fix signed integer overflow in GetCurrentMonitor distance calc"

This reverts commit e0083bc7fe.

* fix GetCurrentMonitor() distance calc overflow

* fix GetCurrentMonitor() distance calc
2026-05-29 18:18:18 +02:00
steampuker be56f2c524 [rcore][GLFW] Fix GetClipboardImage() creating new connection under X11 (#5871)
* Improve GetClipboardImage implementation under X11

* Remove code for creating new connection, handle selection in GLFW connection instead.

* `GetClipboardImage()`: Small fix to remove unnecessary boolean
2026-05-19 18:57:42 +02:00
Ray f35f4b9fad REVIEWED: GetTime(), small addition for RPI Pico 2 2026-05-13 09:17:04 +02:00
Ray c4b4fcc17e Format review 2026-05-13 09:16:29 +02:00
Ray fbf132d1d1 Use rlgl provided interface instead of rlsw direct access 2026-05-13 09:16:19 +02:00
Keks137 9400199b80 [rcore][RGFW] Add fullscreen behaviour on size 0 window creation (#5859)
* port glfw's behaviour on size 0 window creation to rgfw

* updates with change suggestions

* don't do the FLAG_FULLSCREEN_MODE check twice for no reason

---------

Co-authored-by: CrackedPixel <5776225+CrackedPixel@users.noreply.github.com>
2026-05-11 23:25:00 +02:00
Tubbles a005a044da [rcore_android] Restore face-button input on Android gamepads (#5824)
The KEYBOARD-source veto added in #5439 drops face-button key
events that arrive with both AINPUT_SOURCE_KEYBOARD and
AINPUT_SOURCE_GAMEPAD set on the source bitmask. Confirmed
reproducible on GameSir X2 Type-C and 8BitDo Ultimate Bluetooth,
both reporting source 0x501 on every face-button key event.

This source-bit pattern is general AOSP behaviour since Android
3.2 (commit 6f2fba4 in frameworks/base, Feb 2011): EventHub adds
InputDeviceClass::KEYBOARD to any device whose evdev keyBitmask
claims gamepad buttons (BTN_JOYSTICK..BTN_DIGI), and
KeyboardInputMapper::getEventSource stamps the resulting
KEYBOARD|GAMEPAD source on every outgoing key event.

Use AndroidTranslateGamepadButton(keycode) as the discriminator
instead. Recognised gamepad keycodes route to the gamepad path;
unknown keycodes fall through to the keyboard handler.

Assisted-by: Claude:claude-opus-4-7
2026-05-10 19:20:35 +02:00
Ray b2ea5eae5e REVIEWED: long long usage in all raylib, minimize
REVIEWED: Using `long long` format instead of `long long int`, more consistent with the `short` alternative for smaller `int`, instead of `short int`
2026-05-08 22:59:55 +02:00
Ray 61537200c0 Code cleaning 2026-05-07 15:18:42 +02:00
Colin James Wood 080f5c94bd [rlsw][rcore_drm] Silence warnings when using PLATFORM_DRM and GRAPHICS_API_OPENGL_SOFTWARE (#5839)
* fix warnings: goto label not used outside of SW_ENABLE_DEPTH_TEST

* comment out x coordinates that aren't used in SW_RASTER_TRIANGLE

* silence warnings: unused DrmModeConnector functions in rcore_drm.c when using GRAPHICS_API_OPENGL_SOFTWARE
2026-05-07 15:17:20 +02:00
Ray 0a2b81b128 Update rcore_web.c 2026-05-02 09:09:40 +02:00
Tanguy 05c15c8ba7 SDL: Use precise mouse wheel values (#5830) 2026-05-01 19:29:51 +02:00
Ray d9427b1e6f REVIEWED: Avoid static variable floating around and include it to PlatformData struct 2026-04-29 17:42:51 +02:00
Ray 2dd8d7e8b1 Update rcore_desktop_sdl.c 2026-04-29 01:08:16 +02:00
Ray 06621eb3b7 REVIEWED: Comments for consistency and spelling 2026-04-27 11:34:58 +02:00
Ray 4ced756474 Merge branch 'master' of https://github.com/raysan5/raylib 2026-04-18 18:53:05 +02:00
Ray 88f8ca42f5 Update rcore_drm.c 2026-04-18 18:53:03 +02:00
Thomas Anderson f0a043bb75 [Platform/RGFW] add support for software rendering (#5773)
* add support for software rendering

* null check on freeing

* add back line

* rename framebuffer to surface

* add guard on free

* update makefile to prevent software on web

* update for mac
2026-04-17 18:09:57 +02:00
Ray 1cbe438f93 Update rcore_desktop_rgfw.c 2026-04-17 18:03:29 +02:00
Thomas Anderson be768e27f9 fix issue with gettime (#5772) 2026-04-17 17:55:04 +02:00
Ray 82e980bd42 Log info about HighDPI content scaling on display initialization 2026-04-15 12:37:42 +02:00
Krzysztof Szenk 4a6ceb9c76 [rcore_rgfw] Icon color format fix (#5724)
After RGFW update to 2.0.0-dev in fbd83cafc7, RGFW_window_setIcon api has changed -- not it takes pixel format enum instead of number of channels. On raylib side it was still passing 4 (number of channels in rgba) which is enum value for BGRA8. Instead we have to pass 2 now (RGFW_formatRGBA8 = 2).
2026-04-05 10:50:31 +02:00
Ray 6ef0044381 REVIEWED: Window messages WM_SIZING, WM_SIZE, WM_WINDOWPOSCHANGED #5720 2026-04-04 17:37:25 +02:00
Le Juez Victor 138ef838d9 [rlsw] Some platform fixes (#5720)
* fix drm with rlsw

* fix window resizing with sdl

* fix window resizing with win32
2026-04-04 16:47:33 +02:00
Krzysztof Szenk 4ca9170f5b [rcore_rgfw] Updating render resolution as well on SetWindowSize (#5709)
* [rcore_rgfw] Updating render resolution as well on SetWindowSize

* Actually, maybe even better call SetupViewport()
2026-04-01 09:46:14 +02:00
Krzysztof Szenk cb05ef7f03 [rcore_desktop_rgfw] [emscripten] fix typo (#5687)
* RGFW also requires RGBA8 images as window icons, as raylib already reports in raylib.h

* LibraryConfigurations.cmake: exchanged MATCHES -> STREQUAL in platform choosing if-statements

* WebRGFW: remapping mouse/touch position to canvas pixel coordinates

* fix 'typo'

* has to be done like that because of += in case of captured mouse

* [rcore_desktop_rgfw] [emscripten] fix typo
2026-03-23 22:22:21 +01:00
Ray c1dbfc87f3 REVIEWED: PR #5679 2026-03-23 11:52:01 +01:00
Krzysztof Szenk 1e74aba7c3 WebRGFW: remapping mouse/touch position to canvas pixel coordinates (#5679)
* RGFW also requires RGBA8 images as window icons, as raylib already reports in raylib.h

* LibraryConfigurations.cmake: exchanged MATCHES -> STREQUAL in platform choosing if-statements

* WebRGFW: remapping mouse/touch position to canvas pixel coordinates

* fix 'typo'

* has to be done like that because of += in case of captured mouse
2026-03-23 11:31:06 +01:00
Ray 85df4e7de5 REVIEWED: rlsw, use provided library information 2026-03-18 13:31:09 +01:00
Ray 0de2e8092b REVIEWED: GetTime(), make sure division is with doubles #5668 2026-03-17 19:38:29 +01:00
Ray 18756bb79d REVIEWED: Software renderer flag, renamed to GRAPHICS_API_OPENGL_SOFTWARE
Dropped the `11` relative to OpenGL 1.1 because latest `rlsw 1.5` also includes support for FBOs and could potentially implemented other higher level features in the feature, discerning from OpenGL 1.1 limitations
2026-03-17 18:33:15 +01:00
Ray 1eea511070 Remove trailing spaces 2026-03-16 17:51:53 +01:00
Thomas Anderson dfc3f58a06 fixed web platform resize events (#5662) 2026-03-15 23:26:29 +01:00
Ray 1d9e24eb58 REVIEWED: GetTime(), make it consistent between platforms, consider window initialization base time 2026-03-15 20:39:57 +01:00
Soma Mizobuchi 29280971be rcore_platform_sdl: Fix GetTime() resolution for sdl (#5653)
`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
2026-03-15 20:31:18 +01:00
Thomas Anderson fd017c0b2d fixed issue with mouse modes (#5659) 2026-03-15 20:25:31 +01:00
Ray f89d38b086 Resolveed conflicts 2026-03-13 18:55:36 +01:00
ghera 38ed50c07b [rcore][android] Fix CMake shared build and improve --wrap WARNING docs (#5646) 2026-03-13 18:53:39 +01:00
Ray 6ba6df3af3 Remove trailing spaces 2026-03-13 18:50:26 +01:00
ghera f9ee714c76 [rcore][android] Add WARNING comment for --wrap=fopen build system requirements (#5624)
Co-authored-by: Federico Gherardi <ghera@libero.it>
2026-03-05 11:50:47 +01:00
Thomas Anderson de720a8d4c [backend/GLFW] Added bounds check (#5621)
* added bounds check

* update from PR feedback
2026-03-04 08:40:15 +01:00
Ray faf42366ec Code gardening 2026-03-04 01:14:26 +01:00
Ray 1d85071372 Merge branch 'master' of https://github.com/raysan5/raylib 2026-03-03 22:40:44 +01:00
Ray b4746469d4 Formating review, using imperative mode in comments 2026-03-03 22:40:34 +01:00
Maicon Santana 37a852a7ae [web] Add clipboard image implementation for web (#5614)
* Add clipboard image implementation for web

* Making sure that are not malloc empty string or image
2026-03-03 18:57:34 +01:00
Ray 0b9239eca2 REVIEWED: Code formating 2026-03-02 12:24:29 +01:00