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.
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 1f1ee6f77c492e17a9691c367110c11529fab3fb)
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 c981a597dc7c69e7532796b3a206071807479d35)
XInputGetCapabilitiesEx (ordinal 108) is available in XInput 1.4 that is shipped with Windows 8 and newer.
(cherry picked from commit 08a7ca4d53ef0d504ec780936fd65616fe3a9f09)
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 17723381da9bc3eadb129beaeaed2164c64b5155)
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 0fe5713964287b17e05eb09dd4f83d8580dba254)
Author: Sam Lantinga <slouken@libsdl.org>
Date: Tue Nov 14 12:58:33 2023 -0800
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 75df4cc5c2cd6b098f49855437c5262263489eab)
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 708f18d49ef6975769865d247e2ce4da6ce8da76)
This reverts commit ad0af488837e44cbea0f0eab3b2f73b50a74bff4.
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 2c1fbe1967457c6b95323a5ea4136849c66bc307)
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 edd044e90187528656327584b6e2337bbceacd57)