Skip to content
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

Android: Update Xbox controller ids #10795

Closed
wants to merge 2 commits into from

Conversation

ar664
Copy link

@ar664 ar664 commented Jun 30, 2022

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]

@golivax
Copy link

golivax commented Jul 15, 2022

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

@ar664
Copy link
Author

ar664 commented Jul 15, 2022

@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.

@JosJuice
Copy link
Member

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

@JosJuice JosJuice closed this Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants