Open Bug 1903371 Opened 8 months ago Updated 7 months ago

X and Y buttons are inverted on game pads in Firefox

Categories

(Core :: DOM: Device Interfaces, defect, P2)

Firefox 127
defect

Tracking

()

UNCONFIRMED

People

(Reporter: vikinghelmet99, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0

Steps to reproduce:

On any WebGL game (such as on Itch.io), Firefox works with game pads, but has swapped the X and Y buttons. Pressing Y will give you X, pressing X will give you Y.

To be specific, this is the X and Y buttons on the game pad, not the keyboard.

To see this in action, go to https://hardwaretester.com/gamepad and compare behavior with an XInput controller on Firefox and then Chromium; note the difference behavior of the button pad.

Actual results:

Pressing Y gives X functionality, pressing X gives Y functionality, in any program.

Expected results:

X should do what X does on builds for the desktop, or the Chromium browser; and Y should do what Y does.

Summary: X and Y buttons are inverted on gamepads in Firefox → X and Y buttons are inverted on game pads in Firefox

Note that I have done this on KUbuntu 22.04, I can't speak for Windows and MacOS.

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: Canvas2D' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics: Canvas2D
Product: Firefox → Core

dom/gamepad/moz.build suggests the right component for this is DOM: Device Interfaces, moving there as that seems like a better fit, if that is not the case please correct me.

Component: Graphics: Canvas2D → DOM: Device Interfaces

From what I remember the Linux kernel driver for X-Box like controllers reports the wrong information for these buttons, so it doesn't map them to the right cardinal direct: BTN_NORTH, BTN_WEST etc. We could do some special re-mapping, but so far I tried to avoid doing that.

Depends on: 1680982

The severity field is not set for this bug.
:cmartin, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(cmartin)

Oof... This is bad enough that we should probably get it fixed quickly. Are you going to be able to take a look at it, Tom? If not, it will probably be a week or two until I'm able to get to it.

Severity: -- → S3
Flags: needinfo?(cmartin) → needinfo?(evilpies)
Priority: -- → P2

I am probably not going to be able to look at this before next month either.

Flags: needinfo?(evilpies)
You need to log in before you can comment on or make changes to this bug.