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

RESOLVED FIXED in Firefox 68

Status

()

defect
P3
normal
RESOLVED FIXED
Last year
3 months ago

People

(Reporter: daoshengmu, Assigned: daoshengmu)

Tracking

(Blocks 1 bug)

unspecified
mozilla68
x86_64
Windows
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(2 attachments)

Assignee

Description

Last year
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

Updated

Last year
Assignee: nobody → dmu
Assignee

Updated

5 months ago
Blocks: 1523350
Assignee

Updated

5 months ago
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
Assignee

Comment 1

3 months ago

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

Assignee

Comment 3

3 months ago

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.
Assignee

Comment 5

3 months ago

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

Comment 6

3 months ago
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
Assignee

Updated

3 months ago
See Also: → 1542893

Comment 7

3 months ago
bugherder
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.