Diogo Diniz
3ef5ee878c
Adjusted formatting to comply with contribution guidelines
2025-08-14 19:58:22 +01:00
Ray
a9970484f3
Remove trailing spaces
2025-08-14 20:37:18 +02:00
Diogo Diniz
eae1296b08
Fixed bad macro logic
2025-08-14 18:56:31 +01:00
Diogo Diniz
59c979a59d
Added suggestions by planetis-m
2025-08-14 18:46:45 +01:00
Didas72
93f86fa074
fixes #5110
...
Adds more filters for conditional build of GetWindowHandle with glfw
2025-08-14 14:30:29 +01:00
Ray
76284f1a16
Corrected typo
2025-08-13 08:13:18 +02:00
Ray
dd19b8d2c2
REVIEWED: Requested window flags application after window initialization
2025-08-12 11:44:20 +02:00
Ray
195b968b86
Merge pull request #4837 from Andersama/support_all_window_flags_at_initialization
...
[rcore] Support window flags with initialization issues
2025-08-12 11:38:22 +02:00
Ray
95e4494cfe
ADDED: cursorLocked variable and review required code #4940 #4955
2025-08-12 11:33:58 +02:00
Ray
c4414fa1ed
Revert "Merge pull request #4945 from Moros1138/master"
...
This reverts commit bab234a160 , reversing
changes made to 13e384ce71 .
2025-08-12 10:58:56 +02:00
Ray
db2abfb9be
Merge branch 'master' into master
2025-08-12 10:28:52 +02:00
Ray
705ce45a33
FIX: Added callback broke keyboard input on web... #5107
2025-08-10 19:59:33 +02:00
Matthijs Kooijman
9582d25217
Fix backspace key in Rpi SSH keyboard
...
There was a typo in the generated keycode.
2025-08-09 21:04:09 +02:00
Ray
570082deba
WARNING: **NEW** raylib code CONVENTION: Comments do not end with '.'
2025-08-07 18:23:20 +02:00
Ray
b4ecfb648d
Merge pull request #5084 from kariem2k/fix_cmake_sdl3
...
Removed verbose logging on SDL3.
2025-08-03 19:53:53 +02:00
Karim Ahmed
603219d6d6
Removed verbose logging on SDL3. Happens every time the property is read!
2025-08-03 18:48:24 +01:00
Ray
50acba3ce8
REVIEWED: rcore_web, cleaning and reorganizing
2025-07-30 17:31:49 +02:00
Ray
18ae6a377c
Merge pull request #4956 from Moros1138/consume-keyboard-events
...
[rcore][web] Add `EmscriptenKeyboardCallback()` to consume key events
2025-07-30 17:03:10 +02:00
Ray
eb7f8912f8
Minor format tweaks
2025-07-26 12:50:29 +02:00
Ray
c9f9219fa6
REVIEWED: DRM cache buffers support #4988
2025-07-26 12:49:49 +02:00
Ray
86d9afc10c
Merge pull request #4988 from rob-bits/master
...
[rcore][drm] Replace DRM swap buffer implementation with asynchronous page-flipping and triple framebuffer caching
2025-07-26 12:14:21 +02:00
Ray
7262be85fd
Minor format tweaks
2025-07-26 12:06:24 +02:00
Karim Ahmed
32960af1dc
Fixed:
...
Added CMake support for SDL3.
Now supports including SDL2 or SDL3 as a subdirectory within the project. The system will first check for SDL3, then SDL2. If neither is found, it will attempt find_package(SDL3), followed by find_package(SDL2). If all these checks fail, the process will terminate with an error.
2025-07-24 09:48:52 +01:00
Didas72
36364192d5
Fixes GetWindowHandle returning a bad handle under Linux X11
2025-07-19 22:29:08 +01:00
katonar
8388160c32
- fixing SUPPORT_DRM_CACHE define check at the end of InitPlatform()
2025-07-15 13:58:23 +02:00
katonar
5b182139ae
- implementing Raylib coding convention
2025-07-07 17:55:32 +02:00
katonar
de62be0ec5
- created complier flag SUPPORT_DRM_CACHE, to enable triple buffered DRM caching
2025-07-07 17:28:23 +02:00
jonathandw743
79c29cbe24
fixed compile error for PLATFORM sdl
2025-07-06 11:36:44 +01:00
Ray
44f670899c
REVIEWED: Avoid rtext dependency on rcore_desktop_sdl #4959
2025-06-24 20:11:35 +02:00
Ray
59bcf680aa
Code gardening...
2025-06-07 20:14:24 +02:00
Ray
533c12c386
Small security tweaks
2025-06-07 15:33:35 +02:00
katonar
060bd787b1
Refactor: Replace DRM swap buffer implementation with asynchronous page-flipping and framebuffer caching
...
The original implementation created/destroyed framebuffers (FBs) per-frame, leading to kernel overhead and screen tearing. This commit replaces it with a different approach using:
- Asynchronous `drmModePageFlip()` with vblank sync
- Framebuffer caching to reduce repeated FB creation/removal operations
- Proper resource management through BO callbacks and buffer release synchronization
- Added error handling for busy displays, cache overflows, and flip failures
- Event-driven cleanup via page_flip_handler to prevent GPU/scanout conflicts
Co-authored-by: rob-bits
2025-06-05 15:50:07 +02:00
alqeeu
51958d6e2c
changed RGFW_window_eventWait timeout to -1
2025-06-01 17:37:31 +03:00
M374LX
6eeaf1dd5b
Update RGFW to 1.7.5-dev
2025-05-31 16:43:25 -03:00
Ray
c1bb53738e
Merge pull request #4974 from M374LX/rgfw-escape-fix
...
RGFW: fix Escape always closing the window
2025-05-31 20:43:40 +02:00
Ray
9bf4388a4f
Merge pull request #4965 from M374LX/rgfw-update
...
Update RGFW to 1.7
2025-05-31 20:42:08 +02:00
M374LX
bc2b2864e0
RGFW: fix Escape always closing the window
2025-05-31 14:24:38 -03:00
M374LX
3418172617
Update comments
2025-05-29 23:01:48 -03:00
M374LX
a9525bfbc2
Update RGFW to 1.7
2025-05-29 16:03:39 -03:00
Ray
913c236487
REVIEWED: MAX_GAMEPAD_AXES
2025-05-29 12:51:08 +02:00
M374LX
c0cf57f8f0
RGFW backend: add missing Right Control key
2025-05-28 22:38:16 -03:00
Moros Smith
f7fe8b88cb
add EmscriptenKeyboardCallback to consume key events
2025-05-28 17:47:18 -04:00
Moros Smith
8ef6473d33
return to ray's expected resize behavior
2025-05-25 18:58:35 -04:00
Moros Smith
cf2099f18a
the holy grail
2025-05-24 20:33:27 -04:00
Padmadev D
b6daa48a9c
Update rcore_android.c
...
corrected coding conventions.
2025-05-19 15:09:58 +05:30
Padmadev D
5da2d10118
Update rcore_android.c
...
Bug Fix Update
Code to Ignore Hovering Inputs Completely
2025-05-18 18:53:28 +05:30
Moros Smith
358917ffc3
trigger resize event when going into and out of fullscreen mode
2025-05-17 21:08:57 -04:00
Moros Smith
d0d42e78ea
inform glfw that a change of window size has taken place
2025-05-17 21:08:35 -04:00
Moros Smith
b618d7b35b
use parentElement's dimensions for width/height
2025-05-17 21:08:07 -04:00
Ray
8c99a508c6
REVIEWED: WindowSizeCallback(), GLFW
...
It is called on window minification and setting internal width/height to 0, that can break things
2025-05-14 23:49:24 +02:00
Gavin Rohrer
10478ff756
Revert GLFW_SCALE_FRAMEBUFFER to pre GLFW 4.3 behavior
2025-04-25 14:32:02 -04:00
AndrewHamel111
fdb92b373b
Warning to direct users to appropriate function
2025-04-15 21:08:35 -04:00
Ray
80fcca4155
Update rcore_desktop_glfw.c
2025-04-14 12:37:06 +02:00
Ray
cc5739a6d7
REVIEWED: Some PRs formating
2025-04-13 20:55:38 +02:00
Eike Decker
1c4aa1378f
[rcore][SDL2] First touch position is overwritten with mouse pos
...
I believe it makes sense to only do this when there are no known
touch points. I am not even sure if this should be done at all.
See https://github.com/raysan5/raylib/issues/4872 for more information.
2025-04-01 23:10:19 +02:00
Ray
1a67dcb578
REVIEWED: RGB order on SDL3 #3568
2025-04-01 01:26:51 +02:00
Ray
9a049d1d27
Merge pull request #4859 from MikiZX1/master
...
Update rcore_desktop_sdl.c
2025-03-28 18:03:32 +01:00
Jonathan Marler
af16f7823a
Improve description of RestoreWindow
...
Restore window currently says it sets the window state to:
"not minimized/maximized"
However, if a window is maximized and then minimized, it's typical that
it would restore back to being maximized, which is what seems to happen
from my testing. I've reworded the description to better reflect
this behavior.
2025-03-28 10:39:22 -06:00
MikiZX1
55c6864092
Update rcore_desktop_sdl.c
...
raylib app crashing when started and a gamepad is already connected to the PC (even if the gamepad is not used in the app). I only tested this with a gamepad that has a layout which is not recognized. Using SDL3 as backend.
2025-03-26 14:06:58 +01:00
Ray
266fba1111
Minor tweaks
2025-03-21 17:07:55 +01:00
Ray
2f63a15630
Merge pull request #4836 from JeffM2501/unscale_on_resize
...
[rcore] Correctly handle window size on resize in auto-scaled HIGHDPI environment
2025-03-14 17:15:14 +01:00
Jeffery Myers
d56ab670c3
spaces not tabs
2025-03-14 08:18:26 -07:00
Ray
cb830bed72
Increased depth size and clip distances to avoid z-fighting issues
2025-03-13 16:34:39 +01:00
Ray
d0e638cc31
REVIEWED: Platform DRM messages...
2025-03-13 11:42:16 +01:00
Alex Anderson
99a9ecfaac
[rcore] Support window flags with initialization issues
...
This may not be the correct approach, however this appears to work. The idea is that before modifying `CORE.Window.flags` when first creating the window we keep a copy of the flags in order to call `SetWindowState` after initialization has completed, which should behave as if `MaximizeWindow` or `MinimizeWindow`, or conceptually any other flag modifying function were called after `InitWindow`.
This pull request only performs this for the windows platform, modify as needed in the switch statement at the end for others.
2025-03-12 14:56:02 -07:00
Jeffery Myers
4bed3741c1
Unscale the window size on resize if we are doing automatic HighDPI scaling.
2025-03-12 14:16:50 -07:00
Ray
7f8bf2233c
REVIEWED: Formating to follow raylib conventions
2025-03-10 17:08:18 +01:00
Colleague Riley
0853c5b03f
[rcore][RGFW] bug fixes ( #4798 )
...
* update RGFW to 1.6
* properly handle RGFW_quit events
* fix rcore_desktop_rgfw bugs
* update
* update
* uncomment out
2025-03-10 16:50:40 +01:00
Kaluub
9ba0cdbe6d
Fix GetCurrentMonitor comments. ( #4812 )
2025-03-07 19:21:08 +00:00
sleeptightAnsiC
a20d9dedf3
[desktop_glfw] fix InitPlatform crash caused by glfwCreateWindow... ( #4804 )
...
...returning NULL. This was causing a crash few lines later.
Refs: https://github.com/raysan5/raylib/issues/4801#issuecomment-2691201072
Partially-fixes: https://github.com/raysan5/raylib/issues/4801
2025-03-01 23:42:07 +01:00
Colleague Riley
e4dcdfa1f2
update RGFW to 1.6 ( #4795 )
2025-02-25 21:49:37 +01:00
Mario Nachbaur
85a87baf69
Support IsWindowHidden() on web. ( #4789 )
2025-02-23 18:19:42 +01:00
Colleague Riley
c34ef35433
Update RGFW and ensure it's consistent with the GLFW backend ( #4783 )
...
* add PLATFORM_WEB_RGFW
* fix some bugs
* fix web_rgfw gamepad
* send fake screensize
* fix gamepad bugs (linux) | add L3 + R3 (gamepad)
* fix?
* update RGFW (again)
* update raylib (merge)
* fix xinput stuff
* delete makefile added by mistake
* update RGFW
* update RGFW (rename joystick to gamepad to avoid misunderstandings
* update RGFW (fix X11 bug)
* update RGFW
* use RL_MALLOC for RGFW
* update RGFW (fixes xdnd bug)
* fix some formating
* Update RGFW
* update RGFW
* undo change
* undo change
* undo change
* undo change
* have .scroll be 0 by default
* update RGFW
* update RGFW
* update RGFW
* fix year
* fix wasm key event bug
* update RGFW
* link to IOKit
* update
2025-02-21 12:32:09 +01:00
Ray
5ea60dd3ce
Minor tweaks
2025-02-20 18:10:01 +01:00
Ray
32fcfd3549
Minor tweaks
2025-02-19 13:38:22 +01:00
sleeptightAnsiC
77df0ab1e8
[rcore_desktop_glfw.c] fix: make sure that GLFW uses RL_*alloc macros ( #4777 )
...
Raylib allows for providing custom allocators via macros.
GLFW supports this too, but via function pointers.
Make sure that GLFW uses those Raylib macros, by wrapping them in
function calls and setting them up inside of InitPlatform().
This is possible because of glfwInitAllocator() and GLFWallocator.
Fixes: https://github.com/raysan5/raylib/issues/4776
Relates-to: https://github.com/raysan5/raylib/issues/4751
2025-02-18 22:53:18 +01:00
Le Juez Victor
2b59e7475f
Implement Android-specific functions ( #4769 )
...
`GetWindowScaleDPI` and monitor physical dimensions
2025-02-15 19:34:51 +01:00
whaley
e85ae86f70
[platforms/glfw] fix: allow GetGamepadButtonPressed() to return GAMEPAD_BUTTON_LEFT_TRIGGER_2 / GAME_PAD_BUTTON_RIGHT_TRIGGER_2 if they are pressed ( #4742 )
2025-02-01 10:50:25 +01:00
Eike Decker
1f6de0c507
Replacing hardcoded canvas id references with module variable usages ( #4735 )
...
Should also have the benefit of being faster.
2025-01-31 00:34:51 +01:00
Ray
9789ff123b
REVERTING: emscripten_sleep() previous removal #4713
2025-01-28 16:19:30 +01:00
Asdqwe
139de05e9d
[rcore] [SDL2] Fix gamepad event handling by adding joystick instance id tracking ( #4724 )
...
* Fix gamepad SDL_JOYDEVICEADDED and SDL_JOYDEVICEREMOVED event handling for PLATFORM_DESKTOP_SDL by adding joystick instance id tracking
* Fix gamepad button handling
2025-01-25 20:49:42 +01:00
Ray
d48b8afbb5
Update rcore_web.c
2025-01-20 14:01:57 +01:00
Anthony Carbajal
77c509db6e
removed hardcoded sleep ( #4713 )
2025-01-20 12:14:18 +01:00
Ray
74256943a4
REVIEWED: MAX_GAMEPAD_NAME_LENGTH #4695
2025-01-18 19:39:50 +01:00
Colleague Riley
6bf40eee4f
Update to RGFW 1.5 ( #4688 )
...
* add PLATFORM_WEB_RGFW
* fix some bugs
* fix web_rgfw gamepad
* send fake screensize
* fix gamepad bugs (linux) | add L3 + R3 (gamepad)
* fix?
* update RGFW (again)
* update raylib (merge)
* fix xinput stuff
* delete makefile added by mistake
* update RGFW
* update RGFW (rename joystick to gamepad to avoid misunderstandings
* update RGFW (fix X11 bug)
* update RGFW
* use RL_MALLOC for RGFW
* update RGFW (fixes xdnd bug)
* fix some formating
* Update RGFW
* update RGFW
* undo change
* undo change
* undo change
* undo change
* have .scroll be 0 by default
* update RGFW
* update RGFW
* update RGFW
* fix year
* fix wasm key event bug
2025-01-16 00:34:27 +01:00
Eike Decker
5c1cce28a7
Using Module provided canvas id for event binding ( #4690 )
...
This change is replacing the hardcoded "#canvas" element references in
rcore_web to allow using canvas elements that use different names
(which is necessary when using multiple canvas elements on one page).
Also adding a cursor hiding example to mouse example.
2025-01-16 00:32:58 +01:00
Maicon Santana
fc29bc27fd
Fix Touch pointCount reduction ( #4661 )
2025-01-06 11:29:24 +01:00
Asdqwe
ad035edfac
Fix camera initial position ( #4657 )
2025-01-05 12:30:43 +01:00
veins1
97fa3a73e8
Fix: Alt-Tab not working in borderless fullscreen ( #3865 ) ( #4655 )
2025-01-03 17:36:48 +01:00
Ray
fa0eada61a
Update year to 2025
2025-01-01 00:02:52 +01:00
Asdqwe
5b822585e5
[rcore] [GLFW] [SDL2] Updates CORE.Window.eventWaiting and FLAG_WINDOW_ALWAYS_RUN handling ( #4642 )
...
* Add implementation for CORE.Window.eventWaiting on PLATFORM_DESKTOP_SDL
* Optimize GetFrameTime() reset
* Optimize FLAG_WINDOW_ALWAYS_RUN and GetFrameTime() reset for PLATFORM_DESKTOP_GLFW
2024-12-28 15:59:05 +01:00
Mario Nachbaur
7ecc47d12e
Fix IsWindowFocused() on web. ( #4640 )
2024-12-26 20:12:53 +01:00
Asdqwe
4758867815
[rcore] [SDL2] Add implementation for FLAG_WINDOW_ALWAYS_RUN ( #4598 )
...
* Enable FLAG_WINDOW_ALWAYS_RUN by default on PLATFORM_DESKTOP_GLFW
* Revert enabling FLAG_WINDOW_ALWAYS_RUN by default on PLATFORM_DESKTOP_GLFW
* Add implementation for FLAG_WINDOW_ALWAYS_RUN on PLATFORM_DESKTOP_SDL
* Add reset for GetFrameTime()
2024-12-26 19:02:57 +01:00
Colleague Riley
c333e80497
Update RGFW ( #4637 )
...
* add PLATFORM_WEB_RGFW
* fix some bugs
* fix web_rgfw gamepad
* send fake screensize
* fix gamepad bugs (linux) | add L3 + R3 (gamepad)
* fix?
* update RGFW (again)
* update raylib (merge)
* fix xinput stuff
* delete makefile added by mistake
* update RGFW
* update RGFW (rename joystick to gamepad to avoid misunderstandings
* update RGFW (fix X11 bug)
* update RGFW
* use RL_MALLOC for RGFW
* update RGFW (fixes xdnd bug)
* fix some formating
* Update RGFW
* update RGFW
* undo change
* undo change
* undo change
* undo change
* have .scroll be 0 by default
2024-12-25 21:19:51 +01:00
veins1
e5d8de7c63
Fix: Setting flags disables fullscreen #4618 ( #4619 )
2024-12-23 19:26:50 +01:00
Fancy2209
26e12d6b35
Fix Typo in rcore_desktop_sdl.c ( #4621 )
2024-12-20 13:53:51 +01:00
Ray
03ff864087
Formating tweaks
2024-12-18 18:44:23 +01:00
Asdqwe
99cb4cbc36
Fix SetGamepadVibration() TRACELOG message ( #4615 )
2024-12-18 14:53:50 +01:00
Colleague Riley
58004723d8
[rcore][RGFW] Add new backend option: PLATFORM_WEB_RGFW and update RGFW ( #4480 )
...
* add PLATFORM_WEB_RGFW
* fix some bugs
* fix web_rgfw gamepad
* send fake screensize
* fix gamepad bugs (linux) | add L3 + R3 (gamepad)
* fix?
* update RGFW (again)
* update raylib (merge)
* fix xinput stuff
* delete makefile added by mistake
* update RGFW
* update RGFW (rename joystick to gamepad to avoid misunderstandings
* update RGFW (fix X11 bug)
* update RGFW
* use RL_MALLOC for RGFW
* update RGFW (fixes xdnd bug)
* fix some formating
2024-12-18 12:03:42 +01:00
Asdqwe
cdaff163cb
Fix show, hide, focus and unfocus window/flags states for SDL2 ( #4610 )
2024-12-18 11:39:30 +01:00