Open ravikanodia opened 2 years ago
If you run
~/.steam/root/ubuntu12_32/steam-runtime/run.sh steam-runtime-input-monitor
with these devices unconnected, wait for it to finish describing all your other devices (it should say {"all-for-now": true}
at the end), and then connect each of these devices, what additional information is displayed after the {"all-for-now": true}
marker?
Press Ctrl+C to stop the input monitor when it has finished displaying the new device(s). Having that information will help to avoid regressions in SDL for these devices.
This appears to be a third-party controller intended for Switch. SDL already knows about it.
@slouken, do we want this in src/joystick/SDL_gamepad_db.h
, or is generic support for Switch controller clones enough to handle it?
Apologies for the delay. Here is the output of
~/.steam/root/ubuntu12_32/steam-runtime/run.sh steam-runtime-input-monitor
for each of these controllers, after the all-for-now stanza.
controller-0180.txt controller-0184.txt
also, here's what it looked like with a headset connected to the 0184 controller, in case that's relevant: controller-0184-with-headset.txt
@slouken, do we want this in
src/joystick/SDL_gamepad_db.h
, or is generic support for Switch controller clones enough to handle it?
Yes, we want Nintendo Switch controllers in SDL_gamepad_db.h with the button label hint so the face buttons can be reversed.
@ravikanodia: thanks, it's useful to have this information for multiple controllers. I assume this:
"input_ancestor" : {
"sys_path" : "/sys/devices/virtual/input/input32",
"name" : "Microsoft X-Box 360 pad 0",
"bus_type" : "0x0003",
"vendor_id" : "0x28de",
"product_id" : "0x11ff",
"version" : "0x0001"
}
is the virtual controller created by Steam Input, and doesn't appear if you plug in these controllers while Steam is not running?
For Steam and SDL's purposes, all three of your reports are equivalent: as you say, extra functionality of these controllers seems to be handled internally.
also, here's what it looked like with a headset connected to the 0184 controller
This appears to be reported by ... changing a 0 to a 1 in the serial number?! Bizarre.
This audio interface "works for me" in Windows, but in Linux (Ubuntu 22.04), I can see the audio interface listed in my Sound control panel but I have not been able to make audio come out of it.
Steam and SDL both do audio routing via the OS's usual audio paths (PulseAudio, Pipewire or occasionally ALSA) so if the kernel handles this audio interface, it should work in Steam and SDL too, and if the kernel doesn't handle it, there's little that Steam or SDL can do about it.
This controller (0e6f:0184) is similar to the "non-deluxe" PDP Wired controller for Switch which is already listed (0e6f:180). I tested this change and as far as I can tell, the controller works as expected in Steam.
Note that 0184 also includes a USB audio interface, connected to a 3.5mm jack on the controller. This audio interface "works for me" in Windows, but in Linux (Ubuntu 22.04), I can see the audio interface listed in my Sound control panel but I have not been able to make audio come out of it. Also, this audio interface seems to only expose itself to the host when a headset is physically connected to the jack - with nothing connected, neither Windows nor Linux seems to recognize the controller as an audio interface. I don't think solving this mystery is required to add support for the device as a gamepad.
There are some other minor differences between the two controllers, but all of that functionality seems to be handled "inside the hardware" so it is transparent to the host. For reference, 0180 includes "turbo" features, while 0184 has remappable back paddles that can be configured to act as any of the "regular" buttons on the controller.
I have both controllers in my possession so if anyone has more questions about them, I am happy to experiment and provide direct information.