dolphin
dolphin copied to clipboard
Android: Update Xbox controller ids
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]
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:
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
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.
Related issues:
- Issue 12711: Wrong control stick recognition with few GamePads – potential bug source roughly found
- Issue 12874: Dolphin for android not registering full left or down control stick
- https://www.reddit.com/r/DolphinEmulator/comments/cocbpu/android_xbox_controller_not_mapping_c_stick
- https://www.reddit.com/r/EmulationOnAndroid/comments/evweuj/in_dolphin_mmj_anytime_i_try_setting_up_the_c/
- https://forums.dolphin-emu.org/Thread-can-t-reach-some-parts-of-the-screen-with-a-controller
Related PRs:
- #7424
Superseded by PR #11385. We are no longer special casing Xbox controllers.