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
Sam Lantinga
fa5bfe577c
Fixed warnings building for UWP
2024-01-21 06:55:29 -08:00
Sam Lantinga
aa3fc6e904
Fixed D-pad on Xbox One controllers using the HIDAPI driver
2024-01-19 11:43:01 -08:00
Sam Lantinga
1dbe54c4e6
Fixed warning C4244: 'function': conversion from 'SDL_ThreadID' to 'DWORD', possible loss of data
2024-01-19 06:28:54 -08:00
Sam Lantinga
464f4d19fe
Removed obsolete XInput mapping hint
2024-01-18 07:00:21 -08:00
Sam Lantinga
a2665f54c8
Updated the atomic API for SDL 3.0 naming conventions
...
Fixes https://github.com/libsdl-org/SDL/issues/7388
2024-01-18 04:41:34 -08:00
Sam Lantinga
f224af5ac5
Updated Haptic API for SDL 3.0 conventions
...
Also removed the XInput haptic support since using the haptic API for rumble is no longer supported.
2024-01-18 03:26:11 -08:00
Sam Lantinga
8ca9134115
Removed unnecessary NULL assignment
2024-01-18 03:26:11 -08:00
Sam Lantinga
52d6587084
Removed SDL_EVENTS_DISABLED
...
Events are a core part of the SDL API, and shouldn't be disabled
2024-01-17 09:24:04 -08:00
Sam Lantinga
6407e0cc37
Added attribution for GIP protocol handling (thanks @medusalix!)
2024-01-09 11:43:12 -08:00
Sam Lantinga
d3daba791a
Don't try to send the PS third-party feature request to the Logitech G815 keyboard
...
Fixes https://github.com/libsdl-org/SDL/issues/8373
2024-01-06 08:29:01 -08:00
Sam Lantinga
e100992c17
Added mapping for the RX Gamepad, e.g. Pandora Box 7
...
Fixes https://github.com/libsdl-org/SDL/issues/8217
2024-01-06 06:18:13 -08:00
Sam Lantinga
7c5e694022
Ignore a new warning in Visual Studio 2022
2024-01-04 12:44:48 -08:00
Vicki Pfau
bec1b8f849
Add basic rumble support to Steam Deck
2024-01-01 21:46:38 -08:00
Sam Lantinga
87b8f09657
Fixed warning: no previous prototype for function 'SDL_PrivateGetGamepadButtonFromString' [-Wmissing-prototypes]
2024-01-01 14:56:55 -08:00
Sam Lantinga
5b3ee51c6c
Updated copyright for 2024
2024-01-01 13:15:26 -08:00
Sam Lantinga
423b1fafcd
Fixed warning C4047: 'function': '__x_ABI_CWindows_CGaming_CInput_CIRawGameController **' differs in levels of indirection from '__x_ABI_CWindows_CGaming_CInput_CIRawGameController *'
...
This warning happens with old and buggy versions of the Windows SDK
2023-12-29 18:07:30 -08:00
Sam Lantinga
9906d6d3bc
Fixed warning C4244: '=': conversion from 'SDL_bool' to 'Uint8', possible loss of data
2023-12-29 10:37:28 -08:00
Sam Lantinga
e813c72b3c
Fixed warning C4245: 'return': conversion from 'int' to 'SDL_JoystickID', signed/unsigned mismatch
2023-12-29 09:25:57 -08:00
Sam Lantinga
dce626f469
Fixed warning C4244: 'function': conversion from 'int' to 'Uint16', possible loss of data
2023-12-29 09:24:52 -08:00
Sam Lantinga
7f376277e5
Fixed warning C4244: 'initializing': conversion from 'SDL_bool' to 'Uint8', possible loss of data
2023-12-29 09:24:22 -08:00
Sam Lantinga
ffb8515c21
Use the Valve code name for the Steam Deck controller
2023-12-28 15:41:02 -08:00
Sam Lantinga
43c40d30a2
Added comment for the BDA Pro Ex controller
2023-12-28 15:22:28 -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
0dfdf1f3f2
Fixed crash if joystick functions are passed a NULL joystick
2023-12-27 11:25:54 -08:00
Alynne
cae657140c
Add Access Controller
2023-12-26 09:58:09 -08:00
Tyson Whitehead
6daf2e943f
Try SDL_UDEV_deviceclass to detect joysticks even if in a container
...
The udev container issue is mostly to do with device notifications
and netlink. The device classification stuff just pokes file in /sys
and /run/udev. Doesn't hurt to try it first for classifying joysticks
and then fall to the guess heuristics if it fails.
2023-12-24 22:39:16 -08:00
Sam Lantinga
0e5ea3cc4b
Fixed infinite recursion when adding an accelerometer as joystick on iOS
...
Fixes https://github.com/libsdl-org/SDL/issues/8716
2023-12-24 11:19:16 -08:00
Sam Lantinga
c3d84c3342
Record the initial input report mode and only restore simple mode if that's what we started with
...
Fixes https://github.com/libsdl-org/SDL/issues/8108
Closes https://github.com/libsdl-org/SDL/pull/8115
2023-12-24 08:12:14 -08:00
Sylvain
312f98c2a1
Make sure the string is terminated, fixed invalid read in SDL_PrivateParseGamepadConfigString()
2023-12-23 12:55:21 -08:00
Lukas Senionis
a2e05480d6
Use crc16 return value when calculating GUID
...
Fixes the regression introduced by 919cd56b20
2023-12-21 07:00:13 -08:00
Sam Lantinga
1f1ee6f77c
Use the original manufacturer and product strings for the joystick CRC
...
This allows the most information possible for the CRC string, which is used to differentiate controllers with the same VID/PID.
Fixes https://github.com/libsdl-org/SDL/issues/8724
2023-12-20 19:22:37 -08:00
Sam Lantinga
72c366bf3d
Fixed whitespace
2023-12-20 11:06:34 -08:00
Sam Lantinga
c981a597dc
Added Steam Input API support for game controllers
...
Added support for getting the real controller info, as well as the function SDL_GetGamepadSteamHandle() to get the Steam Input API handle, from the virtual gamepads provided by Steam.
Also added an event SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED which is triggered when a controller's API handle changes, e.g. the controllers were reassigned slots in the Steam UI.
2023-12-20 10:40:28 -08:00
Vicki Pfau
a8f4f40d08
Sync more Steam Controller header definitions for the Steam Deck
2023-12-19 20:18:37 -08:00
Dimitriy Ryazantcev
43309d38ed
joystick: Extract 0x02a9 and 0x0291 PIDs into separate defines.
...
Cleanup controller list comments block.
2023-12-18 05:43:38 -08:00
Sam Lantinga
4d5949dcf6
Added a controller name for the Steam virtual gamepad
2023-12-17 10:07:46 -08:00
Sam Lantinga
695846f2ed
Pass through the name of the controller for the XInput mapping
2023-12-17 09:33:53 -08:00
Dimitriy Ryazantcev
08a7ca4d53
XInput: Use XInputGetCapabilitiesEx instead of fragile GuessXInputDevice
...
XInputGetCapabilitiesEx (ordinal 108) is available in XInput 1.4 that is shipped with Windows 8 and newer.
2023-12-17 08:32:10 -08:00
Dimitriy Ryazantcev
0ab13f2498
joystick: fixup for Wireless Xbox 360 Controller VID/PID detection in WGI backend.
...
It turns out that returned PID is zero in this case and it breaks SDL_IsXInputDevice/HIDAPI_IsDevicePresent checks
2023-12-15 08:57:09 -08:00
Sam Lantinga
e6d8ef1a5b
Revert "Back out Steam virtual gamepad changes"
...
This reverts commit 34eb24ebc4 .
2023-12-13 09:45:39 -08:00
Max Maisel
69288038ed
Refactor away some additional integer types.
2023-12-12 12:51:37 -08:00
Max Maisel
5a21febecb
Add new steam deck HIDAPI controller to controller database.
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
Dimitriy Ryazantcev
c790572674
Use existing XUSB driver software PID 0x02a1 instead of PID 0x02fe
...
0x02fe is actually PID of Xbox Wireless Adapter for Windows 10 (Model 1790) and creates confusion.
Here is USB descriptor dump: https://github.com/DJm00n/ControllersInfo/blob/master/xboxone/DescriptorDump_Adapter%20(Xbox%20Wireless%20Adapter%20for%20Windows).txt
2023-12-11 11:45:05 -08:00
Sam Lantinga
5173b0c2cc
Make built-in joystick device lists extendable by using hints
...
Fixes https://github.com/libsdl-org/SDL/issues/8595
2023-12-10 12:53:03 -08:00
Sam Lantinga
34eb24ebc4
Back out Steam virtual gamepad changes
...
We are planning a different approach to handle these
2023-12-10 08:35:35 -08:00