-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testevdev: Add some examples of PDP third-party Switch controllers #7962
Conversation
Thanks: Ravi Kanodia Signed-off-by: Simon McVittie <smcv@collabora.com>
@slouken wrote:
Please could you add those records as a separate change, or help @ravikanodia to provide the necessary info? |
@ravikanodia, you can provide the mapping by running the SDL controllermap test (or gamepadmap in main) and sending the output with the mapping string. |
Thanks for doing this! Should I go ahead and close ValveSoftware/steam-devices#40? Also, would this mapping string still be valuable? |
Yes, the mapping string would still be valuable, and there's a much improved testcontroller application in the SDL main repo that you can use to create it. |
Sorry; how do I build those apps? I didn't see it mentioned in the doc and fumbling around with cmake didn't lead me to an obvious solution. |
cmake -DSDL_TESTS=ON |
Thanks! I walked through the button mapping and copied the resulting string: 030064716f0e00008401000011010000,PDP Faceoff Deluxe+ Audio Wired Controller for Nintendo Switch,crc:7164,platform:Linux,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0, I interpreted "Start" as the Plus button, "Back" as the Minus button, "Guide" as the Home button, and "Misc1" as the screenshot button. Not sure whether the other controller I mentioned in that steam-devices PR is at all relevant to you but while I had the test app opened I decided to try it out as well: 0300ce536f0e00008001000072056800,PDP CO.LTD. Faceoff Wired Pro Controller for Nintendo Switch,crc:53ce,platform:Linux,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3, |
It's interesting that the first controller isn't detected as a Nintendo Switch controller. I see it in the list:
Can you debug into HIDAPI_DriverSwitch_IsSupportedDevice() and HIDAPI_DriverSwitch_InitDevice() and see why it isn't being initialized? |
Oh, you probably don't have udev rules to allow access to /dev/hidraw for that device. :) |
Can you disable hidraw access for the ",PDP CO.LTD. Faceoff Wired Pro Controller for Nintendo Switch" and get a mapping for that as well? You can tell whether hidraw is being used because it will have 6800 as the last two bytes of the GUID when hidraw is active. |
I'm not positive what you mean, I commented out the line for that controller (0180) in 60-steam-input.rules, did the controller mapping again, and got: 0300ce536f0e00008001000011010000,PDP CO.LTD. Faceoff Wired Pro Controller for Nintendo Switch,crc:53ce,platform:Linux,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0, I did notice that when I run build/test/testcontroller, it now says where before, it said so it sounds like maybe this was the right thing to do. |
Lastly, here's the string for the 0184 controller when I add that rule from the other PR to 60-steam-input.rules: 030064716f0e00008401000098006800,PDP Faceoff Deluxe+ Audio Wired Controller for Nintendo Switch,crc:7164,platform:Linux,a:b0,b:b1,back:b4,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3, |
Thanks: Ravi Kanodia (via ValveSoftware/steam-devices#40)
Existing Issue(s)
None