-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firefox Does Not Recognize D-pad Inputs From Switch or PlayStation Joypads #50553
Comments
Can you reproduce this issue in the gamepad tester? |
That website seems to detect my Switch joypad and the d-pad inputs just fine on Firefox. I went through the versions of Godot and the issue pops up in version 3.3.0. Prior to that they work correctly. This was all tested on the latest version of Firefox. |
@CritCorsac Please specify what OS are you on? See #45078 . Might need a new mapping, or the current remap for the given OS/browser is bogus. In any case, following instructions there you can redo the mapping, and post the generated string here so I can compare with what we have in our database. Would also need to know if the controllers are official controller (and if not, what brand they are if possible). |
I should note that the mapping for my Switch joypad has always been off, regardless of if being played in a HTML5 build or not, but even so, the d-pad would always work. I've just always worked around the incorrect mapping. My PlayStation and Xbox are official joypads. My Switch joypad is officially licensed by Nintendo, but is not made by them. This is the string from using my Switch joypad. The d-pad worked fine in your project (perhaps because it was exported on a version of Godot prior to 3.3.0?), but the mapping was still off (but like I said, that's always been an issue for me).
|
I have made a discovery! It seems that the d-pad inputs are not being ignored, but are instead being incorrectly registered as a InputEventJoypadMotion event when certain joypads are being run in certain browsers when they should be an InputEventJoypadButton event. This seems to be causing any d-pad input setup in the input map to simply not work. This everything I've tested so far, all done in Godot 3.3.2. I have wrote the working scenarios in bold. Non-HTML5
Firefox
Chromium
I have attached a very basic minimal reproduction project, if it at all helps. |
That is weird (it was exported earlier, but it already had the new system). I've re-export both in About the PS(which?) controller, I would likely need the mapping for that too (that could be one of the mappings we lost). About the SNES controller, are you sure the 2 versions differs? Can you confirm it with the above links? |
Sorry. I was mistaken. With the Switch joypad, the d-pad is incorrectly being considered an InputEventJoypadMotion event in both 3.2 and 3.3 HTML5 builds. The PlayStation joypad is correctly considered to be an InputEventJoypadButton event in 3.2, but not in 3.3, when exported into Firefox. Your project confirms this as it correctly maps the d-pad buttons in 3.2, but believes the d-pad to be an axis input in 3.3. However, in Chromium, the PlayStation d-pad is correctly mapped in the 3.3 version of your project. |
Great, then this confirms that's one of the mappings we lost in the change, if you could provide that mapping too (PlayStation Controller, |
Make sure to do the mapping on Firefox (i.e. the browser where the mapping is incorrect) ;) |
Here's the mapping for the PlayStation (Official DualShock 4) joypad done in Firefox from your 3.3 project.
|
I don't know if this is worth noting or even related, but I ran your 3.3 project in Chromium with my PlayStation joypad and the label would sometimes read "Standard Gamepad Mapping standard" and sometimes read "Sony" something each time I replugged the joypad in, seemingly at random. |
That sounds like a chromium bug, not correctly mapping the controller sometimes. I've opened #50567 with the new mapping, you can also test them here: https://no-war.fales.me/joy_3.x/ (where both controller should work out of the box on firefox and chrome). |
I can confirm that both the PlayStation joypad and Switch joypad are correctly mapped in both Firefox and Chromium. Thank you for your effort! |
Godot version
3.3.2
System information
Firefox 90.0
Issue description
Firefox is not recognizing any inputs made on the d-pad when exporting the game through HTML5. It can recognize other inputs fine except for inputs from the d-pad. This issue is present on
Xbox,PlayStation and Switch joypads.This issue does not occur in Chromium.This issue does not occur in Chromium for the PlayStation joypad but it does occur for the Switch joypad. This issue does not occur in Godot 3.2.3 but is present in Godot 3.3.0 when tested in Firefox.Upon further testing, the issue does not seem wholly exclusive to Firefox.
To sum things up...
Steps to reproduce
Simply create a project that uses a joypads d-pad buttons as an input and run it in Firefox.
The text was updated successfully, but these errors were encountered: