Sam Lantinga
ba87b96cea
Fixed signed/unsigned warnings
...
Fixes https://github.com/libsdl-org/SDL/issues/7424
2023-03-08 12:36:44 -08:00
Ozkan Sezer
53bde3abee
fix SDL_FindFreePlayerIndex so it can really return -1.
2023-03-08 20:00:00 +03:00
Sam Lantinga
dd7cf12206
Fixed instances of SDL_joystick_players being set to -1 (thanks @AntTheAlchemist!)
...
Fixes https://github.com/libsdl-org/SDL/issues/7426
2023-03-08 08:38:59 -08:00
Sylvain
c963f02571
More fix warnings about static function and prototype
2023-03-08 16:14:09 +01:00
Sam Lantinga
d08338ddc5
Added mapping for the Xbox Elite Core controller connected via Bluetooth on Android
2023-03-06 15:36:49 -08:00
divVerent
6f1f586086
Fix Xbox One gamepad axis assignment on SDL_JOYSTICK_ANDROID API ( #7405 )
2023-03-06 15:33:18 -08:00
Sylvain
9b065bf54b
Fix various warnings: static /void / comma
2023-03-06 12:37:37 +01:00
Sam Lantinga
c9aec268fa
SDL_GetJoystickIDForPlayerIndex() should return 0 for invalid ID (thanks @AntTheAlchemist!)
2023-03-03 16:15:28 -08:00
Sam Lantinga
727c7d4e2f
Don't clobber an existing entry with a different version when adding a gamepad mapping
2023-03-01 16:38:48 -08:00
Sam Lantinga
d5775f6708
The gamepad event structures caxis, cbutton, cdevice, ctouchpad, and csensor have been renamed gaxis, gbutton, gdevice, gtouchpad, and gsensor.
...
Fixes https://github.com/libsdl-org/SDL/issues/7375
2023-03-01 09:48:28 -08:00
Sam Lantinga
da134a3039
Fixed locking up the Logitech F310 with the PlayStation controller detection
2023-02-28 08:36:31 -08:00
Sam Lantinga
206fa4dafb
Added mapping for DualSense Edge Wireless Controller on Linux
...
This is a mapping when using evdev, not the more advanced HIDAPI support.
2023-02-27 15:19:34 -08:00
Sam Lantinga
516e48515e
Changed the VID/PID used for the Backbone One controller on iOS
2023-02-23 12:24:15 -08:00
Sam Lantinga
59bf1c2853
Added support for the Backbone One PlayStation Edition
2023-02-23 11:57:48 -08:00
Sam Lantinga
bff307c4b2
Fixed warning building on iOS
2023-02-22 22:03:25 -08:00
Sam Lantinga
87a83787a3
De-duplicate Google Stadia controllers on macOS
2023-02-21 15:31:32 -08:00
Sam Lantinga
4aeec9d8c2
Rumbling the Google Stadia Controller over Bluetooth works on Linux and macOS
2023-02-21 15:05:57 -08:00
Sam Lantinga
021a7cfa13
Fixed the packet size for Xbox One controllers
2023-02-21 12:47:48 -08:00
Sam Lantinga
1a15d506a6
Removed duplicated conditional
2023-02-20 18:24:52 -08:00
Sam Lantinga
02cea5fca1
Fixed rumble caps for the Nintendo Joy-Con controllers
2023-02-20 17:14:18 -08:00
Sam Lantinga
4994654d4f
Added support for the Razer Wolverine V2 controllers
2023-02-20 15:14:20 -08:00
Sam Lantinga
eede2066fb
Added other names for the DragonRise Inc. Wired Wheel (thanks @felimwhiteley!)
2023-02-17 11:29:27 -08:00
Sam Lantinga
ece8a7bb8e
Hold the joystick lock while opening the HID device on non-Android platforms
...
On Windows the main thread can be enumerating DirectInput devices while the Windows.Gaming.Input thread is calling back with a new controller available, and in this case HIDAPI_IsDevicePresent() returned false since the controller initialization hadn't completed yet, creating a duplicate controller.
Fixes https://github.com/libsdl-org/SDL/issues/7304
2023-02-16 09:50:04 -08:00
Sam Lantinga
beb6a2afdc
Map the Android MENU button back to the SDL MENU key
...
Thanks to @AntTheAlchemist for the investigation!
Fixes https://github.com/libsdl-org/SDL/issues/7318
2023-02-14 18:02:12 -08:00
Sam Lantinga
5925cd4ef3
Fixed handling simple mode PS4 reports
...
Fixes https://github.com/libsdl-org/SDL/issues/7270
2023-02-14 17:51:16 -08:00
Sam Lantinga
68e2f23066
Sorted controller list
2023-02-10 17:18:02 -08:00
Alfredo Escobar
76552e4780
Add Hori Pokken Tournament DX Pro Pad
2023-02-10 17:16:26 -08:00
Sam Lantinga
e4face7c1d
Fixed the share button on the ThrustMaster eSwap PRO Controller Xbox
2023-02-10 16:46:21 -08:00
Sylvain
7c4ec1867b
Remove some vim config lines
2023-02-10 11:00:48 +01:00
Sam Lantinga
e65e2c8ed7
SDL_CloseJoystick() should return void, not int
2023-02-09 17:26:16 -08:00
Linus Probert
3bd737d44c
Add error returns to void functions that can fail/set errors.
...
This takes care of the last set of void functions that could
potentially be shifted to instead return an int indicating success and
setting an error in case of an error.
2023-02-09 07:23:21 -08:00
Sam Lantinga
b7c6fec10a
Make sure we synchronously re-enable USB reporting mode for Switch controllers (thanks @SortaCore!)
...
Fixes https://github.com/libsdl-org/SDL/issues/3450
2023-02-08 14:22:39 -08:00
Sam Lantinga
50575ed223
Note the Google Stadia controller doesn't support rumble over Bluetooth
2023-02-08 14:16:24 -08:00
Sam Lantinga
00e02de77b
Fixed mis-detecting the share button on the Xbox controller over NDIS
2023-02-08 14:16:21 -08:00
Sam Lantinga
d1c72bb0bc
Dynamically update the serial number if it isn't available at first
...
This happens for Xbox One controllers using newer firmware connected over NDIS
2023-02-08 14:16:17 -08:00
Sylvain
c5c94a6be6
Change return type from void to int, for functions that set an error
...
(SDL_SetError(), SDL_OutOfMemory(), SDL_Unsupported(), SDL_InvalidParam())
Update prototype to forward errors to generic layer, for the functions:
MoveCursor, WarpMouse, GL_DeleteContext, GetDisplayModes.
Check invalid parameter in SDL_SetTextInputRect() generic layer.
2023-02-07 13:51:45 -08:00
Sam Lantinga
5fded632d6
Added support for the Turtle Beach REACT-R and Recon Xbox controllers
2023-02-06 20:14:12 -08:00
Sam Lantinga
0208a0eeb3
Added support for the Logitech ChillStream
2023-02-06 13:28:59 -08:00
Sam Lantinga
22bafe8729
Removed debug code accidentally committed
2023-02-06 11:23:53 -08:00
Sam Lantinga
f8b41919da
Fixed warning running a command queue without any vertex operations
2023-02-06 11:22:00 -08:00
Leonardo Brondani Schenkel
6f06e4bc80
Add Linux mapping for 8BitDo Pro 2 Wired Controller for Xbox
...
Without these mappings, this controller "kinda" works out of the box:
- `SDL_GameControllerMapping()` works because it will notice "Xbox" in
the name and use the default XInput mappings
- `SDL_GameControllerMappingForGUID()` will not find any mapping
lsusb:
```
ID 2dc8:2000 8BitDo 8BitDo Pro 2 Wired Controller for Xbox
```
In Linux this controller is supported by two drivers:
- `xpad` (built-in to the kernel), exposes the controller name from the
USB descriptor and the GUID starts with 03 (0x03 = BUS_USB)
- `xone` (https://github.com/medusalix/xone ), exposes a virtual
controller which is always named "Microsoft X-Box One pad" and the
GUID starts with 06 (0x06 = BUS_VIRTUAL)
This commit adds the 2 GUIDs from both drivers so mappings will always
be found and the real controller name will always be reported.
(cherry picked from commit 4266cf8504 )
2023-02-05 08:45:24 -08:00
Sam Lantinga
1c03ddefc3
Sorted controller list
2023-02-05 08:43:26 -08:00
Antonis Geralis
52cd9fcbb0
Added Elecom 8button gamepad
2023-02-05 08:41:07 -08:00
Alynne
4dea13e02f
Adds Stadia BT mapping
2023-02-03 15:01:49 -08:00
Sylvain Becker
cb6b8b0132
Simplify flags testing ( #7220 )
2023-02-03 13:08:42 -08:00
Sam Lantinga
673bc57649
Don't accept official mappings for controllers that aren't unique
...
For example, the DragonRise Inc. Generic USB Joystick
See https://github.com/gabomdq/SDL_GameControllerDB/issues/202 for details
2023-02-02 08:39:54 -08:00
Sam Lantinga
917607c335
Fixed sort_controllers.py and resorted game controller database
2023-02-02 08:38:22 -08:00
Sam Lantinga
d29e1f3632
Added gamepad mappings for the Xin-Mo Dual Arcade Fightstick
2023-02-01 23:09:53 -08:00
Sam Lantinga
c5f570b30b
Make sure count is 0 in out of memory conditions
...
This prevents a crash if the caller assumes that they can always dereference the returned pointer if there is a non-zero count.
2023-01-31 10:04:51 -08:00
Sam Lantinga
a06a593aa6
Renamed SDL_GetGamepadNumTouchpads and SDL_GetGamepadNumTouchpadFingers to match the new convention
2023-01-24 13:47:30 -08:00