summaryrefslogtreecommitdiffhomepage
path: root/src/platforms/rcore_desktop_sdl.c
AgeCommit message (Collapse)Author
2024-07-16Adding GetKeyName(int key) (WIP) (#4161)MrScautHD
2024-07-04Change SDL_Joystick to SDL_GameController (#4129)Frank Kartheuser
With SDL_Joystick my game controller wasn't working properly. That's why I changed it to SDL_GameController.
2024-07-01Update Storage base path, use provided SDL base pathRay
2024-06-30REVIEWED: Formatting, follow raylib coding conventionsRay
2024-06-30REVIEWED: Formatting, follow raylib coding conventionsRay
2024-05-21Update rcore_desktop_sdl.cRay
2024-05-21Call SDL_GL_SetSwapInterval() after GL context creation (#3997)JupiterRider
2024-04-15Fix GetKeyPressed for PLATFORM_DESKTOP_SDL (#3869)Arthur
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 <[email protected]>
2024-03-09Implement IsCursorOnScreen for PLATFORM_DESKTOP_SDL (#3862)Peter0x44
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.
2024-02-29Review formattingRay
2024-02-29Fix SDL multitouch tracking (#3810)mooff
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.
2024-02-24Gamepad rumble support with SDL2 (#3819)GideonSerf
* 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 <[email protected]>
2024-02-04Add gamepad support to PLATFORM_DESKTOP_SDL (#3776)A
Co-authored-by: Arthur <[email protected]>
2024-02-01REVIEWED: macOS issues #3767Ray
2024-01-02Update copyright to 2024Ray
2023-12-28Fix SUPPORT_WINMM_HIGHRES_TIMER for PLATFORM_DESKTOP_SDL (#3679)ubkp
2023-12-23REVIEWED: SDL text input to Unicode codepoints #3650Ray
REVIEWED: GLFW naming conventions to reflect codepoints reading
2023-12-11[rcore] Fix real touch gestures for `PLATFORM_DESKTOP_SDL` (#3614)ubkp
* 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
2023-12-07[rcore] Fix `IsMouseButtonUp()` and add touch events for ↵ubkp
`PLATFORM_DESKTOP_SDL` (#3610) * Fix IsMouseButtonUp() and add touch events for PLATFORM_DESKTOP_SDL * Fix coding convention
2023-12-07[rcore] Fix `IsKeyPressedRepeat()` for `PLATFORM_DESKTOP_SDL` (#3605)ubkp
* Fix IsKeyPressedRepeat() for PLATFORM_DESKTOP_SDL * Fix missing space
2023-12-05Fix GetKeyPressed and GetCharPressed for SDL (#3604)ubkp
2023-12-03Revert "Fix Windows Hardcoding (#3600)"Ray
This reverts commit 4ae2af0bccc2792e0f380152b8638bfa384595c6.
2023-12-03Fix Windows Hardcoding (#3600)mr sihc
Compiles on Linux & co. now
2023-11-28Fix typos in src/platforms/rcore_*.c (#3581)RadsammyT
2023-11-28Fix SetMousePosition() for SDL (#3580)ubkp
2023-11-27Fix SetWindowIcon() for SDL (#3578)ubkp
2023-11-20Update rcore_desktop_sdl.cRay
2023-11-18fix for running gles2 with sdl on desktop (#3542)_Tradam
2023-11-14Fix missing keys on PLATFORM_DESKTOP_SDL (#3539)ubkp
2023-11-13Fix mouse button order for SDL (#3534)ubkp
2023-11-02Comments tweaksRay
2023-11-02[core] Fix gestures for `PLATFORM_DESKTOP_SDL` (#3499)ubkp
* Fix gestures for SDL * Review the gesture handling for SDL * Review 2
2023-10-31Comments tweaksRay
2023-10-29Update rcore_desktop_sdl.cRay
2023-10-29Remove rcore.h include from SDL (#3475)ubkp
2023-10-26ADDED: Drop files support to `PLATFORM_DESKTOP_SDL`Ray
2023-10-25Fix OpenURL on SDL (#3460)ubkp
2023-10-23REVIEWED: Check OpenGL version required, fix #3457Ray
2023-10-23REVIEWED: `InitPlatform()` organization and code-gardeningRay
2023-10-22[core] Complement implementations for `SDL` (3) (#3450)ubkp
* Fix SetWindowMinSize and SetWindowMaxSize * Fix window resizes to update the viewport * Fix window resizes to update the viewport 2
2023-10-21[core] Complement implementations for `SDL` (2) (#3447)ubkp
* Add note and todo to GetWindowScaleDPI * Complement ToggleFullscreen and change ToggleBorderlessWindowed * Complement SetWindowState and ClearWindowState
2023-10-20[core] Complement implementations for `SDL` (#3444)ubkp
* Complement SetWindowMonitor SDL implementation * Complement SetWindowMonitor SDL implementation 2 * Complement SetWindowMonitor SDL implementation 3 * Complement GetMonitorPosition SDL implementation * Small tweaks to various SDL implementation * Small tweaks to various SDL implementation 2
2023-10-19REVIEWED: Issue with functions definitionsRay
2023-10-19REVIEWED: Issue with symbols exposureRay
2023-10-19REDESIGNED: Move platforms to separate directory #3313Ray