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

[Gamepad API] Ipega PG-9118 dpads are not working with bluetooth connection #45734

Open
archerallstars opened this issue Feb 5, 2021 · 6 comments

Comments

@archerallstars
Copy link

Godot version:

OS/device including version:

  • Windows 10 Home 64-bit, Version 20H2, OS build 19042.746
  • Intel® UHD Graphics 620, Version 27.20.100.9168

Issue description:

After I remapped all the buttons as needed, I noticed that the dpads are not working. It seems Godot thinks I press the dpads all the time in which I didn't. I tested this in Google Chrome and Firefox, the issue happens in both browser as shown below:

Google Chrome:

MOV_0598.mp4

Firefox:

oo.mp4

The dpads are working fine with Xbox 360 Controller Emulator (x360ce) as shown below:

2021-02-05.15-49-03.mp4

I expect the gamepad to work fine using bluetooth connection without having to use x360ce.

Steps to reproduce:

  1. Connect the Ipega PG-9118 gamepad via bluetooth connection.
  2. Go to the Joypads (DEBUG) website.
  3. Remap the button as needed.
  4. Test your dpads.

Minimal reproduction project:

@Faless
Copy link
Collaborator

Faless commented Feb 6, 2021

Can you please provide the generated remap string?

@archerallstars
Copy link
Author

Can you please provide the generated remap string?

The generated remap string is
Windows19490402, (Vendor: 1949 Product: 0402),a:b0,b:b1,y:b4,x:b3,start:b11,back:b10,leftstick:b13,rightstick:b14,leftshoulder:b6,rightshoulder:b7,dpup:+a9,dpleft:+a9,dpdown:+a9,dpright:+a9,leftx:a0,lefty:a1,rightx:a2,righty:a5,lefttrigger:a3,righttrigger:a4,platform:Javascript

However, due to this issue, the dpads cannot be remapped as shown below:

2021-02-05.22-12-28.mp4

I also notice that the dpads in this gamepad is threaded as axes, not buttons.

@Faless
Copy link
Collaborator

Faless commented Feb 6, 2021

I also notice that the dpads in this gamepad is threaded as axes, not buttons.

This is common in gamepads, the hardware likely treat them as Hats, the browser convert them to axes.

Windows19490402, (Vendor: 1949 Product: 0402),a:b0,b:b1,y:b4,x:b3,start:b11,back:b10,leftstick:b13,rightstick:b14,leftshoulder:b6,rightshoulder:b7,dpup:+a9,dpleft:+a9,dpdown:+a9,dpright:+a9,leftx:a0,lefty:a1,rightx:a2,righty:a5,lefttrigger:a3,righttrigger:a4,platform:Javascript

Seems like dpad where all mapped to +a9. Can you check which axis correspond to which dpad?

@Faless
Copy link
Collaborator

Faless commented Feb 6, 2021

Oh, I just realized, it seems that axis is not conformant to the spec, since it's outside the -1, 1 range.
In that case, as mentioned in the blog post, we can't fix it. The issue should be reported to browsers issue tracker.
If you can, please verify that the axis 9 shows values greater then one here: https://gamepad-tester.com/ and report it to your browser issue tracker.

@archerallstars
Copy link
Author

Seems like dpad where all mapped to +a9. Can you check which axis correspond to which dpad?

All dpads are mapped to AXIS 9 by default, the default value is 3.28571. When I pressed dpad-up the value is -1.00000, dpad-down is 0.14286, dpad-left is 0.71429, dpad-right is -0.42857, as shown below:

MOV_0600.mp4

The problem is I can't remap the dpads because whenever I try to remap it, it always reverts back to the default value, 3.28571. Therefore the remap will remember all the dpads at the same value at 3.28571 (this is the value when I do not press any dpad).

Oh, I just realized, it seems that axis is not conformant to the spec, since it's outside the -1, 1 range.
In that case, as mentioned in the blog post, we can't fix it. The issue should be reported to browsers issue tracker.
If you can, please verify that the axis 9 shows values greater then one here: https://gamepad-tester.com/ and report it to your browser issue tracker.

The axis 9 value is always at 3.28571 by default. However, when I pressed any direction, the value does not exceed the -1, 1 range. This behavior is the same on Google Chrome and Firefox.

@archerallstars
Copy link
Author

I also report this bug upstream at Chromium bug #1175440.

However, for Firefox, they don't even let me log in to their bug tracker. My account is disabled and the reason is... I have not logged on in a long time. I tried logging in with both my email and my Github account, but both are disabled from them due to the same reason. Well, good for them 😫

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants