* [rcore] add 'GetClipboardImage' for windows
* [rcore] GetClipboardImage removed some unneeded defines
* [rcore] PLATFORM_SDL: create a compatility layer for SDL3
* external: add win32_clipboard.h header only lib
* [rcore] using win32_clipboard on platforms rlfw and rgfw
* [rcore] fix warnings in SDL3 compatibility layer
* Makefile: Allow specifying SDL_LIBRARIES to link, this helps with SDL3
* Makefile: examples makefile now compile others/rlgl_standalone only when TARGET_PLATFORM is PLATFORM_DESKTOP_GFLW
* Makefile: examples makefile now compile others/rlgl_standalone only when TARGET_PLATFORM is PLATFORM_DESKTOP_GFLW
* [rcore]: PLATFORM_SDL: improve clipboard data retrieval
* external: remove unused function from win32_clipboard.h
* Makefile: allow for extra flags necessary when compiling for SDL3
* [rcore]: fix string typo
* [rcore]: Properly handle NULL dpi passing. As is allowed in SDL2
* external: fix arch finding on win32_clipboard.h to allow compilation on msvc cmake CI
* [rcore]: PLATFORM_SDL: Treat monitor as an ID in SDL3 as opposed to an index as in SDL2
* [rcore]: typo
The key handling in PLATFORM_DESKTOP_SDL was faulty in two ways, which
led to GetKeyPressed returning incorrect data.
CORE.Input.Keyboard.keyPressedQueue was updated only on SDL_TEXTINPUT,
meaning only text characters were registered as a pressed key, but not
function keys (eg. tab, backspace...). Also on such event, both
CORE.Input.Keyboard.keyPressedQueue and
CORE.Input.Keyboard.charPressedQueue were assigned the key's
corresponding codepoint, when CORE.Input.Keyboard.keyPressedQueue
should get the raylib keycode instead.
CORE.Input.Keyboard.keyPressedQueue is now updated on SDL_KEYDOWN event
instead.
Co-authored-by: Arthur <hi@thenightwat.ch>
I did some testing and this seems to work okay, but it *is* different to
GLFW. GLFW seems to lose "IsCursorOnScreen" for one frame upon pressing
alt+tab over the window, without a different window covering it. SDL
seems to have a more reasonable behavior for this case. Either way it's
an edge case and I don't know the exact way to fix, likely requires
internal GLFW changes.
The fingerId from SDL was used as an index into the CORE.Input.Touch
arrays, but it's an opaque / arbitrary int64, way bigger
than MAX_TOUCH_POINTS, so the first non-simulated touch event would segfault.
* Added gamepad rumble to rcore_desktop.c and rcore_desktop_sdl.c
Still need to add to the rest of the platforms.
* Add SetGamepadVibration warnings to unimplemented platforms.
* Added MAX_GAMEPAD_VIBRATION_TIME
The rumble in SDL2 will continue for MAX_GAMEPAD_VIBRATION_TIME unless the user cancels it with a call to SetGamepadVibration(0.0f,0.0f,0.0f)
* Cast float duration value to Uint 32
* Changed defines from int to float and fixed typo
---------
Co-authored-by: Gideon Serfontein <gse@newspacesystems.com>
* Fix touch gestures for PLATFORM_DESKTOP_SDL
* Complement note and optimization
* Events optimization
* Optimize gesture handling
* Reverts previous commit and fixes GESTURE_DRAG to not trigger GESTURE_SWIPE* when it ends
* Reapply previous gesture handling optimization also fixing GESTURE_DRAG to not trigger GESTURE_SWIPE* when it ends