Sam Lantinga
3a3aaac221
Added 4 auxiliary buttons to the game controller API
...
Xbox Elite controllers use AUX1-AUX4 to represent the paddle buttons when using the HIDAPI driver
PS4 and PS5 controllers use AUX1 to represent the touchpad button
Nintendo Switch Pro controllers use AUX1 to represent the capture button
2020-11-06 11:30:52 -08:00
Sam Lantinga
a22beef402
Moved the PS5 controller driver to a separate file, as the advanced feature protocol is very different from that of the PS4
2020-11-05 17:03:28 -08:00
Sam Lantinga
bd2dd3f6bb
Added Android mapping for the Sony PS5 Controller
2020-11-05 15:36:15 -08:00
Sam Lantinga
4d79f9662f
Added initial support for the Sony PS5 Controller
2020-11-05 15:02:54 -08:00
Sam Lantinga
e555d45331
Added SDL_JoystickHasLED
...
Currently, this is only supported by the PS4 HIDAPI driver.
2020-11-05 11:07:54 -08:00
Ethan Lee
83cddd2ebc
Add SDL_JoystickSetLED.
...
Currently, this is only supported by the PS4 HIDAPI driver.
2020-04-30 11:57:29 -04:00
Sam Lantinga
ddc0727bba
Fixed implicit memcpy() when building for ARM64 on Windows (thanks Seigo!)
2020-10-27 09:00:42 -07:00
Sam Lantinga
99ed0d7ab9
Map the guide button by default on Android 11
2020-10-16 12:40:12 -07:00
Sam Lantinga
3755f6920f
Added mapping for Xbox One S controller and PS4 controller on Android 11, including guide button
2020-10-16 12:40:10 -07:00
Sam Lantinga
d9aea0c3a0
Update the existing haptic player when we rumble on iOS
2020-10-15 10:13:42 -07:00
Sam Lantinga
a558409b2e
Only include CoreHaptics if we're building with rumble support
2020-10-13 21:08:18 -07:00
Sam Lantinga
75d5be974c
Fixed compiling with an older iOS SDK
2020-10-13 21:08:17 -07:00
Sam Lantinga
6b62494ee4
Added support for controller battery status on iOS 14
2020-10-13 21:08:15 -07:00
Sam Lantinga
1b31e9f6dc
Added support for game controller rumble on iOS 14
2020-10-13 21:08:13 -07:00
Sam Lantinga
2d7b33cb41
Added support for the controller home button on iOS 14
2020-10-13 21:08:11 -07:00
Sam Lantinga
45c644cc99
Added support for the MOGA XP5-X Plus
2020-09-28 21:19:45 -07:00
Kai Krakow
c3ecf18cc4
Linux: Add hint for disabling deadzones
2020-07-21 23:38:42 +02:00
Sam Lantinga
cab1a715f5
Fixed bug 5233 - PS3 Gamepad Motion Control not correctly ignored on Linux
...
Igor Morgado
PS3 Controller motion sensor string is being reported as
`Gasia Co.,Ltd PS(R) Gamepad Motion Sensors`
But `src/joystick/SDL_gamecontroller.c` line1690 only ignores if matches the string `Controller Motion Sensors`.
```
#if defined(__LINUX__)
if (name && SDL_strstr(name, "Controller Motion Sensors")) {
/* Don't treat the PS3 and PS4 motion controls as a separate game controller */
return SDL_TRUE;
}
#endif
```
Therefore, SDL is mapping 2 Game controllers instead one.
Maybe reduce the substring to match `Motion Sensors` instead.
A simple log from my application is shown below:
INFO: Game controller device 0 - PS3 Controller:PS3 Controller found.
INFO: Controller 0: Player 0: 054c:0268:8111 - PS3 Controller - PS3 Controller - Gasia Co.,Ltd PS(R) Gamepad
INFO: Game controller device 1 - PS3 Controller:PS3 Controller found.
INFO: Controller 1: Player 1: 054c:0268:8111 - PS3 Controller - PS3 Controller - Gasia Co.,Ltd PS(R) Gamepad Motion Sensors
2020-07-15 10:15:52 -07:00
stfx
b162629546
cmake: Fix building with -DSDL_HAPTIC=Off
2020-07-08 17:28:34 +02:00
Ryan C. Gordon
0e98040d43
joystick: Linux joysticks now recover better from dropped events.
...
Fixes Bugzilla #4830 .
2020-06-28 16:23:05 -04:00
stfx
efe0935904
Fix compile without DIRECTX
2020-06-15 10:31:16 +02:00
Sam Lantinga
aefe19ff08
Added support for the NACON Revolution Pro Controller 3 and the GameStop PS4 Fun Controller
2020-06-09 11:31:39 -07:00
Sam Lantinga
6f241bd520
Fixed build
2020-06-09 10:47:29 -07:00
Sam Lantinga
086be21e7a
ControllerList: add support for NACON asymetric controller and Revolution 3, Hori mini wireless ps4 controller, and 2 PDP switch controllers
2020-06-09 10:47:27 -07:00
Sam Lantinga
3b76109f64
ControllerList: remove giotek controller from list - vid/pid appears to be reused in bunch of devies including ones with different fw/protocol and treating as ps4 controller breaks them.
2020-06-09 10:47:25 -07:00
Sam Lantinga
a9cfac3835
Controller: Deadzone improvements
2020-06-09 10:47:23 -07:00
Sam Lantinga
9fa8d6d0be
Define constants not available on older kernels
2020-06-08 17:07:55 -07:00
Sam Lantinga
eea0b0e088
Fixed bug 5168 - Memory leak in RAWINPUT_JoystickOpen
...
meyraud705
Variable 'hwdata' is not freed in RAWINPUT_JoystickOpen if device->driver->OpenJoystick() fails.
2020-06-02 17:08:31 -07:00
Cameron Gutman
134362e745
Enable Xbox One HIDAPI driver on macOS
...
The Xbox One HIDAPI driver is required on macOS for Xbox One S Bluetooth
support since https://hg.libsdl.org/SDL/rev/10c3a10908e9
2020-04-25 19:15:51 -07:00
Sam Lantinga
ac1f174ad5
Fixed bug 5167 - Memory leak in GuessXInputDevice
...
meyraud705
Variable 'devices' is not freed if function GuessXInputDevice, in SDL_xinputjoystick.c, return early.
2020-06-02 17:02:37 -07:00
Sam Lantinga
d000c1cd6d
Fixed bug 5155 - HIDAPI_JoystickDisconnected incorrect array shift
...
Anthony Pesch
I was looking into my own input bug and noticed an issue in the HIDAPI code while looking over it. I don't have a controller that goes down this path to test and try to provoke the issue, but it looks pretty straight forward.
The memmove to shift the joystick id array on disconnect isn't scaling the size by sizeof(SDL_JoystickID), likely corrupting the ids on disconnect.
2020-05-29 21:22:11 -07:00
Sam Lantinga
ae9ff11bae
The zero happens at a higher level now
2020-05-29 14:54:07 -07:00
Sam Lantinga
39c958bbaa
Initialize the raw_map before getting controller mappings from the driver
2020-05-29 14:48:39 -07:00
Sam Lantinga
2db049473b
Fixed variable names to be consistent across functions
2020-05-29 14:48:05 -07:00
Sam Lantinga
345b4d7e14
Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification
...
Jan Bujak
I wrote a new driver for my gamepad on Linux. I'd like SDL to support it out-of-box, as currently it just treats it as a generic joystick instead of a gamepad. From what I can see the only way to do that is to either 1) pick one of the already supported controllers' PID, VID and button layouts and have my driver send that (effectively lying that it's something else), or 2) submit a preconfigured, hardcoded mapping to SDL.
Both of those, in my opinion, are silly when we already have the Linux Gamepad Specification which standarizes this:
https://www.kernel.org/doc/html/v4.15/input/gamepad.html
Unfortunately SDL doesn't make use of it currently. So I've took it upon myself to add it; patch is in the attachments.
Basically what the patch does is that if SDL finds no built-it controller mappings for a given joystick it then asks the joystick backend to autodetect it, and that uses the relevant evdev bits to figure out which button/axis is which. (See the specs for more details.)
With this patch applied my own driver for my controller works out-of-box with SDL with no extra configuration and is correctly recognized as a gamepad; this is also going to be the case for any other driver which follows the Linux Gamepad Specification.
2020-05-29 13:37:21 -07:00
Brendan Shanks
032fa681a8
Add Logitech G29 to steering wheel list
2020-04-24 14:03:30 -07:00
Sam Lantinga
1a1f1704a2
Don't include the iOS joystick driver if joysticks are disabled
2020-05-27 10:35:43 -07:00
Sam Lantinga
e9f567c707
Fixed building on iOS with MFI controllers disabled
2020-05-27 10:14:08 -07:00
Ryan C. Gordon
5fe34a4079
hidapi: Fix compiler warning.
2020-05-20 17:01:25 -04:00
Ryan C. Gordon
68777406e5
windows: Fix calls to CoCreateInstance() so last parameter is a LPVOID *.
2020-05-20 16:58:33 -04:00
Sam Lantinga
1e5dd06f83
Added support for the HORI Real Arcade Pro on Mac OSX and Linux
2020-05-06 12:19:58 -07:00
Sam Lantinga
cd2bdaef1c
ControllerList: add PDP Faceoff Deluxe Audio Switch Controller and HORI Real Arcade Pro V Switch Edition
2020-05-06 11:19:52 -07:00
Sam Lantinga
0e5b48d2d8
ControllerList: add NACON Revolution Unlimited (and it's dongle) and NACON Daija fight stick.
2020-05-06 11:19:47 -07:00
Sam Lantinga
11723411ab
Added support for the Razer Kishi
2020-05-04 10:16:10 -07:00
Sam Lantinga
b0b12e46ba
Fixed running on older versions of iOS
2020-04-27 13:31:10 -07:00
Sam Lantinga
01fd8130fd
Fixed compiler warning
2020-04-23 11:13:02 -07:00
Sam Lantinga
c6b24b4b7c
Added support for the following controllers:
...
* 8BitDo N30 Pro 2
* 8BitDo SN30 Gamepad
* 8BitDo SN30 Pro+
* 8BitDo Zero 2
* SZMY-POWER PC Gamepad
* ThrustMaster eSwap PRO Controller
* ZEROPLUS P4 Wired Gamepad
In additional, all 8BitDo controllers use SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to have the correct mapping based on user preferences.
2020-04-23 11:07:07 -07:00
Sam Lantinga
4727f79416
Don't use the WGI driver if another driver is already handling the joystick
2020-04-23 10:13:17 -07:00
Sam Lantinga
6ca7f510ae
Fixed crash trying to get battery status on some devices
2020-04-23 09:35:32 -07:00
Sam Lantinga
d12ea89c1e
Added support for the following controllers:
...
* PDP Afterglow Switch Controller
* Thrustmaster ESwap Pro PS4 controller
* Giotek VX4
* Generic PS4 controller vid/pid that several knock offs use
2020-04-22 10:50:50 -07:00