This is a mapping when using evdev, not the more advanced HIDAPI support.
(cherry picked from commit 206fa4dafb633ed074b930cbb3440a9925c532f2)
(cherry picked from commit 715749f578f8379f192c5805ec41804e1a411bf8)
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 4266cf8504c08b17ef55be11c27f2fc7a17b6edf)
For example, the DragonRise Inc. Generic USB Joystick
See https://github.com/gabomdq/SDL_GameControllerDB/issues/202 for details
(cherry picked from commit 673bc5764942e3f645f1ff7d64f3d6a2059e3cdb)
(cherry picked from commit c4a493de973af6053ef5085d7e67587aba1a8463)
This fixes handling the 8BitDo SN30 Pro with the 2.00 firmware in PS4 mode
Fixes https://github.com/libsdl-org/SDL/issues/7270
(cherry picked from commit 3951cae4a56fddcb42ce4141a6518c97fa9125cd)
(cherry picked from commit 57ae9f466db41e32c67c5a9a03c28f7803ac02c9)
- Avoids precision loss caused by large floating point numbers.
- Adds unit test to test the signal-to-noise ratio and maximum error of resampler.
- Code cleanup
It occasionally takes a few millseconds for the GCController framework to handle the device notification and set up the device
Fixes the duplicate controller issue in https://github.com/libsdl-org/SDL/issues/6686
(cherry picked from commit 645823fc901c98b688512d3b3e70cc8922e8140c)
(cherry picked from commit 3f00fa16c656d0651c43720d8f84138ac3b998ee)
This happens on Windows 11 with fullscreen desktop windows when the desktop is brought up with the Windows+D shortcut.
Fixes https://github.com/libsdl-org/SDL/issues/7419
(cherry picked from commit 2ca727aec6f5f264620f80999beb5ef77eefec4a)
(cherry picked from commit 46d143376a55817c240a58f226ca944581d414cf)
Setting the cursor clip area to a single pixel prevents the relative mouse motion remote desktop warping from working, so the mouse is never recentered.
(cherry picked from commit daffe02b117ccd484763eadc716e4d4453c89868)
(cherry picked from commit ad09976eca7c931ef468119b4a4716ec7e07560e)
Fixes hotplug issues on Steam Deck for Proton and native games
(cherry picked from commit bcd97b36d23d08226e98a995eafd3d6aa35401b4)
(cherry picked from commit e7376b7b74026d7da041d2c848e99c9f7f4d74c0)
We are guaranteed that the lock will be held during shutdown, so if we are in InvokeRemoved(), it's because we're shutting down controllers and need to remove them from our internal list.
Fixes https://github.com/libsdl-org/SDL/issues/7016
(cherry picked from commit ac99db9fc8d528a79abb98a5641e0fd94aa20a9e)
(cherry picked from commit ebc2fb411f178c806119b57ae3c18553d7391a13)
Some of them lock up or reset, and the vast majority of devices are not actually game controllers.
Fixes https://github.com/libsdl-org/SDL/issues/6733
(cherry picked from commit 83b29f9ce1fe6caa06769544c3b5f6c10ea97a0f)