Closed Bug 1465643 Opened 6 years ago Closed 6 years ago

DualShock 4 has different axis amount between wireless and wired mode on Windows

Categories

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

x86_64
Windows
defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: daoshengmu, Assigned: daoshengmu)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

DualShock 4 in Firefox, Wireless DS4: 18 buttons, 15 axes Wired DS4: 18 buttons, 8 axes ------- In Chrome, Both of wireless and wired modes have 18 buttons and 4 axes.
Assignee: nobody → dmu
Priority: -- → P3
Blocks: 1523350
Summary: DualShock 4 has different axis amount between wireless and wired mode in Windows → DualShock 4 has different axis amount between wireless and wired mode on Windows

For the #remapping section [1], we should consider to manage a gamepad mapping list for different gamepad vendors. I notice gamepad vendors have their own mapping rule and most of them are different. Now, I can use hid and call GetValueCaps() to get the same amount for wired and wireless mode with 10 axes, but we have to deal the mapping rule.

Btw, on MacOS, DS4 has 18 btns and 6 axes.

[1] https://www.w3.org/TR/gamepad/#remapping

IIUC, the part of dpadCaps code in WindowsGamepad [1] will never been entered, the hasDpad condition is somehow been broken and useless. I am going to remove these code and use our new remapping mechanism to replace it. In DefaultRemapper class, I would like to just return HID raw data.

[1] https://searchfox.org/mozilla-central/rev/44a212460990ffffecf50a8e972d3cbde2e7216b/dom/gamepad/windows/WindowsGamepad.cpp#733

Attachment #9052318 - Attachment description: Bug 1465643 - Remapping DualShock 4 buttons and axes on Windows. → Bug 1465643 - Part 2: Remapping DualShock 4 buttons and axes on Windows.

For other gamepads' remappers, I would like to file an another bug once this lands.

Pushed by dmu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9133f02b68c4 Part 1: Removing unused hasDpad logic in WindowsGamepad.cpp. r=qdot https://hg.mozilla.org/integration/autoland/rev/3c267ad86e3c Part 2: Remapping DualShock 4 buttons and axes on Windows. r=qdot
See Also: → 1542893
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: