Commit Graph

13 Commits

Author SHA1 Message Date
Sam Lantinga
d154b37b41 Renamed *FromInstanceID() to *FromID() 2024-07-14 13:01:53 -07:00
Max Maisel
607b1f225c Drain HIDAPI buffer in SDL_hidapi_steamdeck.c.
Add a loop around SDL_hid_read() in the Steam Deck HIDAPI driver as it
is done in other HIDAPI drivers. This loop reads data from the device and
processes it until the input buffer is empty which ensures that clients
always get the latest data.

This fixes an input latency issue if the application polls the events
slower than the hardware generates them.
2024-07-05 08:25:52 -07:00
Ozkan Sezer
e909c0360f remove most of SDL_OutOfMemory() calls where SDL is the allocator.
Since commit 447b508a77, SDL_malloc,
SDL_calloc, and SDL_realloc already calls SDL_OutOfMemory().
2024-05-08 20:00:50 +03:00
Sam Lantinga
cd231a65f6 Added SDL_GetJoystickCaps() and SDL_GetGamepadCaps() to get the capabilities of controllers
Also added SDL_GAMEPAD_CAP_PLAYER_LED to let the application know if the controller has a visible player LED
2024-01-22 19:23:42 -08:00
Vicki Pfau
bec1b8f849 Add basic rumble support to Steam Deck 2024-01-01 21:46:38 -08:00
Sam Lantinga
70ba3f2830 Report the D-Pad for HIDAPI gamepads as a hat
This makes it easier for games that don't use the gamepad API to handle D-Pad navigation, and is consistent with many other non-HIDAPI mappings.

Fixes https://github.com/libsdl-org/SDL/issues/8754
2023-12-28 14:14:51 -08:00
Sam Lantinga
72c366bf3d Fixed whitespace 2023-12-20 11:06:34 -08:00
Vicki Pfau
a8f4f40d08 Sync more Steam Controller header definitions for the Steam Deck 2023-12-19 20:18:37 -08:00
Max Maisel
69288038ed Refactor away some additional integer types. 2023-12-12 12:51:37 -08:00
Max Maisel
67d44c1017 Disable lizard mode while steam deck HID device is opened. 2023-12-12 12:51:37 -08:00
Max Maisel
6dd6827343 Translate steam deck HID reports to SDL events. 2023-12-12 12:51:37 -08:00
Max Maisel
94f621e030 Implement steam deck HIDAPI initialization. 2023-12-12 12:51:37 -08:00
Max Maisel
c1a7d0f96e Add steam deck detection and HIDAPI driver scaffold. 2023-12-12 12:51:37 -08:00