dolphin icon indicating copy to clipboard operation
dolphin copied to clipboard

Android: Update Xbox controller ids

Open ar664 opened this issue 2 years ago • 3 comments

See pr #7424 .

My xbox controller does not need to rescale the triggers ( product id 0x0b20 ), which was given via a new controller update. I am unsure if any other xbox product ids have correct trigger scaling. [Needs further testing]

ar664 avatar Jun 30 '22 01:06 ar664

Sorry to hijack your PR, but I think I have some information that might help. I am using an original Gamecube controller via an 8BitDo GBros bluetooth adaptor and I cannot map the c-stick correctly on Dolphin on Android (latest dev version). Up and Down are both mapped as "Axis 14+". Similarly, Left and Right are both mapped as "Axis 11+". Then I came across your PR and discovered that the original code is rescaling the triggers for Xbox controllers. Next, I downloaded an Android App to check my gamepad and guess what: (i) the vendor id and product id of the GBros adapter match those of an XBox One Rev.3 controller and (ii) the c-stick is read by Android as Axis Z and Axis RZ. See this screenshot:

Screenshot_20220714-234612_Gamepad Tester

So I think your PR is beautiful and moves things in the right direction by limiting the "rescaling patch" to older XBox controllers. However, even with your PR, I would continue to be unable to map the c-stick. Hence, I wonder if there's any way to make the conditions even tighter/stronger, such that only (old) XBox controllers would receive the rescaling patch. Is there anything else we could use besides the VendorId and ProductId? I see a getName() in the InputDevice Android API. I wonder if that would help (sorry, I'm not an Android programmer). Thanks and sorry again to hijack your PR

golivax avatar Jul 15 '22 04:07 golivax

@golivax

That is quite an interesting find. I assume it is due to the .kl layouts in Android/Linux that are associated with that vendor & product id that 8bitdo decided to do that. I also used this app in determining my controller vendor & product id.

Also an update to my previous finding, the vendor & product id of my controller appear to be associated with unknown gamepad. (See https://xbox-forums.com/threads/unknown-gamepad-vendor-045e-product-0b20-controller-doesnt-get-recognized-as-an.466967/ ) So using the name and vendor might be the correct approach. I will be looking for a gamepad tester iso for dolphin, to double check that my controller is reporting the same values as that app, so stay tuned for my results on that.

ar664 avatar Jul 15 '22 12:07 ar664

Related issues:

Related PRs:

  • #7424

golivax avatar Aug 10 '22 05:08 golivax

Superseded by PR #11385. We are no longer special casing Xbox controllers.

JosJuice avatar Mar 12 '23 11:03 JosJuice