Vicki Pfau
41bf6b5a51
Add basic rumble support to Steam Deck
...
(cherry picked from commit bec1b8f849 )
2024-01-01 21:48:41 -08:00
Sam Lantinga
0fc3574464
Updated copyright for 2024
2024-01-01 13:19:49 -08:00
Alynne
2afbb5713c
Add Access Controller
...
(cherry picked from commit cae657140c )
2023-12-26 09:58:47 -08:00
Tyson Whitehead
3b1e0e163b
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 16:02:38 -08:00
Sam Lantinga
857e5b08c3
Fixed trying to add a game controller mapping for the accelerometer on iOS
...
Fixes https://github.com/libsdl-org/SDL/issues/8716
(cherry picked from commit 0e5ea3cc4b )
2023-12-24 11:22:22 -08:00
Sam Lantinga
aeda6a8e6f
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
(cherry picked from commit c3d84c3342 )
2023-12-24 08:23:36 -08:00
Sylvain
3a8032f491
Make sure the string is terminated, fixed invalid read in SDL_PrivateGameControllerParseControllerConfigString()
...
(cherry picked from commit 312f98c2a1 )
2023-12-23 12:58:54 -08:00
Lukas Senionis
e7c4575719
Use crc16 return value when calculating GUID
...
Fixes the regression introduced by 919cd56b20
(cherry picked from commit a2e05480d6 )
2023-12-21 07:00:57 -08:00
Sam Lantinga
919cd56b20
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
(cherry picked from commit 1f1ee6f77c )
2023-12-20 19:25:35 -08:00
Ozkan Sezer
d76097dc5e
fix os/2 and watcom builds after commit 7bb0e839a6
2023-12-21 01:11:24 +03:00
Sam Lantinga
7bb0e839a6
Added Steam Input API support for game controllers
...
Added support for getting the real controller info, as well as the function SDL_GameControllerGetSteamHandle() to get the Steam Input API handle, from the virtual gamepads provided by Steam.
Also added an event SDL_CONTROLLERSTEAMHANDLEUPDATED which is triggered when a controller's API handle changes, e.g. the controllers were reassigned slots in the Steam UI.
(cherry picked from commit c981a597dc )
2023-12-20 13:29:57 -08:00
Vicki Pfau
5240071b1c
Sync more Steam Controller header definitions for the Steam Deck
...
(cherry picked from commit a8f4f40d08 )
2023-12-20 06:50:54 -08:00
Sam Lantinga
91f8b4dea2
Added a controller name for the Steam virtual gamepad
...
(cherry picked from commit 4d5949dcf6 )
2023-12-17 10:08:17 -08:00
Sam Lantinga
2aadef022e
Pass through the name of the controller for the XInput mapping
...
(cherry picked from commit e6d88b254add377743de7bf33a7a4fec8cec79c3)
2023-12-17 09:32:54 -08:00
Dimitriy Ryazantcev
7391cd34da
XInput: Use XInputGetCapabilitiesEx instead of fragile GuessXInputDevice
...
XInputGetCapabilitiesEx (ordinal 108) is available in XInput 1.4 that is shipped with Windows 8 and newer.
(cherry picked from commit 08a7ca4d53 )
2023-12-17 09:32:43 -08:00
Sam Lantinga
239b5278bf
Revert "Back out Steam virtual gamepad changes"
...
This reverts commit f0e7f3e7e5 .
2023-12-13 09:46:10 -08:00
Max Maisel
33588662ef
Refactor away some additional integer types.
2023-12-12 12:52:04 -08:00
Max Maisel
bed789794d
Add new steam deck HIDAPI controller to controller database.
2023-12-12 12:52:04 -08:00
Max Maisel
0dbe9022fc
Disable lizard mode while steam deck HID device is opened.
2023-12-12 12:52:04 -08:00
Max Maisel
a6b9d987e9
Translate steam deck HID reports to SDL events.
2023-12-12 12:52:04 -08:00
Max Maisel
5718ba253f
Implement steam deck HIDAPI initialization.
2023-12-12 12:52:04 -08:00
Max Maisel
e7f03de468
Add steam deck detection and HIDAPI driver scaffold.
2023-12-12 12:52:04 -08:00
Dimitriy Ryazantcev
33843b0933
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
(cherry picked from commit c790572674 )
2023-12-11 11:49:28 -08:00
Sam Lantinga
79a8e8cf04
Make built-in joystick device lists extendable by using hints
...
Fixes https://github.com/libsdl-org/SDL/issues/8595
(cherry picked from commit 5173b0c2cc )
2023-12-10 22:52:12 -08:00
Sam Lantinga
6526c4d0fc
Refactor VIDPID list loading code
...
(cherry picked from commit d91e96e7f5 )
2023-12-10 09:02:56 -08:00
Sam Lantinga
f0e7f3e7e5
Back out Steam virtual gamepad changes
...
We are planning a different approach to handle these
2023-12-10 08:38:20 -08:00
Sam Lantinga
ddac844034
Fixed build
2023-12-09 21:44:12 -08:00
Sam Lantinga
dd28637947
Use the Steam virtual gamepad slot as the gamepad player index
...
(cherry picked from commit 7529d25b2b )
2023-12-09 21:01:08 -08:00
Sam Lantinga
5b26d4e0ca
Sort Steam virtual gamepads by Steam controller slot
...
This makes sure that games launched by Steam see the first controller first, and the controllers in the game match up with the controllers in the Steam UI.
Fixes https://github.com/libsdl-org/SDL/issues/8672
(cherry picked from commit 17723381da )
2023-12-09 20:35:33 -08:00
Ethan Lee
757c984ddb
gamecontroller: Backport 3.0 'type:' field to 2.0
2023-11-30 14:42:56 -08:00
Sam Lantinga
8f14dc6998
Corrected comment
...
(cherry picked from commit 45938bbfa5 )
2023-11-28 12:30:10 -08:00
zoeyjodon
3381828cc6
Fix 3DS Analog Values ( #8581 )
...
(cherry picked from commit 059e550e98 )
2023-11-28 12:29:55 -08:00
Sam Lantinga
546bab0a8c
Fixed the GameCube HIDAPI controller mapping
...
Fixes https://github.com/libsdl-org/SDL/issues/8617
Closes https://github.com/libsdl-org/SDL/pull/8623
Closes https://github.com/libsdl-org/SDL/pull/7930
2023-11-28 10:26:58 -08:00
Sam Lantinga
98ee4a5292
Removed HIDAPI controller mappings
...
These are already provided internally by SDL
(cherry picked from commit dd984dcd9f )
2023-11-28 10:11:56 -08:00
Sam Lantinga
8d47e3bb82
Added support for the NACON Revolution 5 Pro controller
...
(cherry picked from commit f0e47f8ee0 )
2023-11-27 12:12:25 -08:00
Anonymous Maarten
4940b5dbc2
SDL_bsdjoystick: fix -Wundef warning on FreeBSD
2023-11-22 06:50:00 +03:00
Sam Lantinga
dcd21d042f
Improved GCController handling on Apple platforms
...
Automatically map controllers as gamepads when using the GCController framework and prefer the physicalInputProfile when possible.
Testing with macOS 13.4.1, macOS 14.1.1, iOS 15.7.4, tvOS 17.1:
* iBuffalo Classic USB Gamepad (macOS only)
* Logitech F310 (macOS only)
* Apple TV remote (tvOS only)
* Nimbus MFi controller
* PS4 DualShock controller
* PS5 DualSense controller
* Xbox Series X controller
* Xbox Elite Series 2 controller
* Nintendo Switch Pro controller
* Nintendo Switch Joy-Con controllers
(cherry picked from commit 0fe5713964 )
Author: Sam Lantinga <slouken@libsdl.org >
Date: Tue Nov 14 12:58:33 2023 -0800
2023-11-21 15:17:53 -08:00
Sam Lantinga
4de4b1e7a0
Don't tickle PS4 Bluetooth controllers in simple mode
...
The 8BitDo Zero 2 only sends reports when state changes, so trips the disconnected Bluetooth controller detection. The expected use case is that most people will have official PS4 controllers in enhanced report mode, so disconnected Bluetooth controller detection will still work for those.
Fixes https://github.com/libsdl-org/SDL/issues/8556
(cherry picked from commit 75df4cc5c2 )
2023-11-21 13:25:31 -08:00
Anonymous Maarten
d81d986858
cmake: fix uses of undefined macro identifiers (-Wundef)
2023-11-17 03:06:26 +00:00
Sam Lantinga
cc7c0a2dab
Fixed IOS_SupportedHIDDevice() returning SDL_FALSE before initialization
...
(cherry picked from commit 34392db9c3 )
2023-11-14 10:58:18 -08:00
Sam Lantinga
76cc24e34a
Added SDL_HINT_JOYSTICK_IOKIT and SDL_HINT_JOYSTICK_MFI to control whether the IOKit and GCController drivers should be used for joystick support.
...
This can be used to work around issues where the Apple GCController driver doesn't work for some controllers but there's no way to know which GCController maps to which IOKit device.
(cherry picked from commit 708f18d49e )
2023-11-14 10:32:52 -08:00
Sam Lantinga
cc20d0147e
Revert "Check to make sure the Windows joystick device has buttons and axes"
...
This reverts commit ad0af48883 .
It turns out the ROG PUGIO II actually enumerates as a gamepad, so this change didn't have any effect anyway. We're getting lots of reports of people's racing pedals and similar devices no longer showing up, so we'll revert this again.
Fixes https://github.com/libsdl-org/SDL/issues/8227
Fixes https://github.com/libsdl-org/SDL/issues/8484
(cherry picked from commit 2c1fbe1967 )
2023-11-13 21:37:18 -08:00
Sam Lantinga
8c82b73027
Fixed the ROG PUGIO II showing up as a game controller
...
This mouse actually enumerates as a gamepad with 2 axes, 8 buttons and a hat.
We'll ignore it like the other ROG mice, unless someone specifically wants to use it as a gamepad.
(cherry picked from commit edd044e901 )
2023-11-13 21:37:06 -08:00
Sylvain Becker
f3419d8c04
Re-add SDL_assert() with non boolean ptr syntax ( #8531 )
2023-11-11 12:29:05 +03:00
Sam Lantinga
c29df1699e
Added shortened name for "Nintendo Co., Ltd."
...
(cherry picked from commit 87794d03ad )
2023-11-10 17:32:34 -08:00
Sam Lantinga
4a0bd06d58
Added support for the GameSir-G7 Controller for Xbox
...
(cherry picked from commit 2e6c48dcb4 )
2023-11-10 17:32:11 -08:00
Sam Lantinga
03f29c19dc
Added support for the Dragonrise GameCube adapter with VID 0x1843
...
(cherry picked from commit fbb6934905 )
2023-11-10 16:45:07 -08:00
Sylvain Becker
a14b948b6c
[SDL2] pointer boolean ( #8523 )
2023-11-10 06:30:56 -08:00
Sam Lantinga
af7fe2cf9b
Actually we need to enumerate the 8BitDo Xbox SKUs
...
At the point we're calling SDL_IsJoystickXboxSeriesX(), we don't know for sure that the controller is an Xbox controller.
Fixes https://github.com/libsdl-org/SDL/issues/8174
(cherry picked from commit 15bc12165a )
2023-11-08 00:43:43 -08:00
Sam Lantinga
524ccf033f
Assume all 8BitDo Xbox controllers have a share button
...
Fixes https://github.com/libsdl-org/SDL/issues/8174
(cherry picked from commit 8049af3355 )
2023-11-08 00:36:27 -08:00