Closed Bug 1849039 Opened 3 years ago Closed 3 months ago

Add DualSense support to Gamepad API

Categories

(Core :: DOM: Device Interfaces, enhancement)

Firefox 116
enhancement

Tracking

()

VERIFIED FIXED
153 Branch
Tracking Status
firefox152 --- verified
firefox153 --- verified

People

(Reporter: lepko, Assigned: lepko)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0

Steps to reproduce:

I tried to play a browser game that has controller support and my DualSense controller did not work as expected. Other controller like Xbox One/Series controllers work. You can test the Gamepad API here https://hardwaretester.com/gamepad and you see that the controller is not properly mapped.

The controller works correctly in other browsers (Chrome, Edge).

Actual results:

When you have the DualSense controller connected the Gamepad API does not recognize it as a standard controller.

You get broken data, for example the d-pad does not work and the right stick vertical axis is broken and connected to the trigger instead.

Expected results:

DualSense controller should be recognized as a standard controller and the buttons and other inputs should be correctly mapped.

I'm actually currently working on a patch to add a GamepadRemapper that supports the GameSense controller and will submit a patch shortly.

Assignee: nobody → lepko.san
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

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

You get broken data, for example the d-pad does not work and the right stick vertical axis is broken and connected to the trigger instead.

I can confirm the D-pad is not being registered as any of the buttons, but rather as gamepad.axes[4]. When connected wirelessly, the controller also reports 14 buttons and when connected with a cable, it reports 15 (the mic mute button).

I'm actually currently working on a patch to add a GamepadRemapper that supports the GameSense controller and will submit a patch shortly.

I tried building Firefox locally with your patch from Phabricator applied, but sadly did not see a difference between what the device was capable of before and after the change. There is a 90% probability that I did something wrong as this is my first time building from a patch, but wanted to mention my troubles. Is there something else required besides running ./mach build when considering the changes to dom/gamepad/?

Assignee: nobody → lepko.san
Status: NEW → ASSIGNED
Attachment #9349297 - Attachment description: Bug 1849039 - Add DualSense support to Gamepad API. r?cmartin → Bug 1849039 - Add DualSense support to Gamepad API.
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: PS5 gamepads don't work in Firefox
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing:
  • Risk associated with taking this patch: low
  • Explanation of risk level: This should only affect users with PS5 controllers. This has also been baking in Nightly for a while.
  • String changes made/needed?: no
  • Is Android affected?: no
Attachment #9597020 - Flags: approval-mozilla-release?
QA Whiteboard: [qa-triage-done-c154/b153]
Attachment #9597020 - Flags: approval-mozilla-release? → approval-mozilla-release+

Hello! I can confirm that the issue is fixed with firefox 153.0b3 and 152.0.2 on Ubuntu 24.04 and Windows 11 using the website provided in the description with the dual sense controller.

I will update the flags and status of this issue accordingly.

Have a nice dya

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triage-done-c154/b153] → [qa-triage-done-c154/b153][qa-ver-done-c154/b153]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: