Closed Bug 2026335 Opened 2 months ago Closed 1 month ago

Xbox Wireless Controller has X/Y swapped under Linux (evdev)

Categories

(Core :: DOM: Device Interfaces, defect)

defect

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: jrmuizel, Assigned: lepko, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug)

User Story

user-impact-score:400

Attachments

(2 files)

Looks like the same problem as bug 2000789

The IsXpadDevice detection won't work for a bluetooth connected controller.

See Also: → 2000789
Flags: needinfo?(tschuster)

Sadly it's a bit difficult to find information on how to do this properly and I only have a fake wired X-Box controller. Can you try out the patch?

Flags: needinfo?(tschuster) → needinfo?(jmuizelaar)

What if we just switched to mapping the buttons numerically like Chrome does instead of trying to work around the weird mapping?

Flags: needinfo?(tschuster)
Blocks: 1898998
Flags: needinfo?(jmuizelaar)
Flags: needinfo?(jmuizelaar)
User Story: (updated)

Actually, it seems like Chrome detects the kind of gamepad and maps the buttons appropriately:
https://source.chromium.org/chromium/chromium/src/+/main:device/gamepad/gamepad_standard_mappings_linux.cc;bpv=1;bpt=1

(In reply to Tom S. (please needinfo tschuster) from comment #2)

Sadly it's a bit difficult to find information on how to do this properly and I only have a fake wired X-Box controller. Can you try out the patch?

I've tested the patch with a Xbox Series X|S controller:
it now returns "xpad" when wired and "microsoft" when wireless (BT)

I'm planning to do some patches this weekend for this and some other issues with Xbox and PS controllers on linux. Would it be ok if i take this bug?

This is similar to bug 2000789 but for bluetooth controllers.

Co-authored-by: Tom Schuster <evilpies@gmail.com>

Assignee: nobody → lepko.san
Status: NEW → ASSIGNED

I tested with a Xbox 360 wireless controller with the proprietary dongle (360 didn't support BT yet) and it works (xpad driver)
I tested with a Xbox Series X|S controller wired (xpad driver) and wireless (microsoft driver) via BT and both now correctly map the XY buttons.

I'm not sure what the policy is but I added Tom as Co-authored-by in the commit since I based it on his patch. And added stransky as a reviewer since he reviewed the last patch related to these buttons. Hope thats okay.

Flags: needinfo?(tschuster)
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
QA Whiteboard: [qa-ver-opt-c152/b151]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: