Skip to content

Add normalized names for Emscripten joysticks#15824

Merged
slouken merged 1 commit into
libsdl-org:mainfrom
Nintorch:normalized-web-joy-names
Jun 13, 2026
Merged

Add normalized names for Emscripten joysticks#15824
slouken merged 1 commit into
libsdl-org:mainfrom
Nintorch:normalized-web-joy-names

Conversation

@Nintorch

@Nintorch Nintorch commented Jun 13, 2026

Copy link
Copy Markdown
Contributor
  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Description

This PR normalizes the joystick names for the Emscripten joystick backend (i.e. removes the vendor/product IDs from the name, because they can be retrieved from the GUID). Here's a table that shows the current and new names:

Chrome, current Chrome, new Firefox, current Firefox, new
An unmapped controller usb gamepad (Vendor: 0810 Product: e501) usb gamepad 0810-e501-usb gamepad usb gamepad
PS4 controller with 8BitDo adapter in XInput mode Xbox 360 Wireless Controller Xbox 360 Wireless Controller Xbox 360 Wireless Controller Xbox 360 Wireless Controller
PS4 controller Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 09c Wireless Controller 054c-09cc-Wireless Controller Wireless Controller
Xbox One controller Xbox One S Controller Xbox One S Controller Xbox 360 Wireless Controller Xbox 360 Wireless Controller
JoyCon Left Wireless Gamepad (STANDARD GAMEPAD Vendor: 057e Product: 2006) Wireless Gamepad - -
JoyCon Right Wireless Gamepad (STANDARD GAMEPAD Vendor: 057e Product: 2007) Wireless Gamepad - -
JoyCon Pair Joy-Con L+R (STANDARD GAMEPAD Vendor: 057e Product: 200e) Joy-Con L+R - -

Would this be a good idea?

Existing Issue(s)

None

@slouken slouken merged commit 7bbd9d5 into libsdl-org:main Jun 13, 2026
46 checks passed
@slouken slouken added this to the 3.4.12 milestone Jun 13, 2026
@Nintorch Nintorch deleted the normalized-web-joy-names branch June 13, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants