Add support for Nacon Compact PS4 Wired Controller (0x146b:0x0603) #15258
Open
annoybot wants to merge 2 commits intolibsdl-org:mainfrom
Open
Add support for Nacon Compact PS4 Wired Controller (0x146b:0x0603) #15258annoybot wants to merge 2 commits intolibsdl-org:mainfrom
annoybot wants to merge 2 commits intolibsdl-org:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for Nacon Compact PS4 Wired Controller (0x146b:0x0603)
Tested and confirmed working on macOS (Apple Silicon) via
SDL_JOYSTICK_HIDAPI_XBOX_360driver over libusb. All inputs verified:A/B/X/Y, LB/RB, LT/RT (full analog), both sticks, d-pad, Share/Options.
Center touchpad is inert — XInput protocol has no touchpad data channel.
Problem
This controller uses XInput over a vendor-specific USB interface (no HID).
Platform HID backends (IOHIDManager, hidraw) can't see it — only libusb can.
SDL3 already supports the protocol; two guards blocked the device from reaching
the driver.
Fix
src/hidapi/SDL_hidapi.c— Added0x146b:0x0603toSDL_libusb_required[].The libusb whitelist only had Nintendo devices. Affects macOS and Linux.
src/joystick/hidapi/SDL_hidapi_xbox360.c— Addedelse ifbranch inthe macOS MFI guard to let libusb-required devices through instead of deferring
to GCController (which can't see them). Generic — future
SDL_libusb_required[]entries benefit automatically. Not needed on Linux (no MFI guard).
Other Nacon XInput controllers
Only
0x0603was hardware-tested. Five other Nacon XInput PIDs incontroller_list.hlikely need the same fix:0x0601— BigBen Interactive XBOX 360 Controller0x0604— NACON Daija Arcade Stick0x0605— NACON PS4 controller in Xbox mode0x0606— NACON Unknown Controller0x0609— NACON Wireless Controller for PS4Runtime Requirement
Requires libusb (
brew install libusbon macOS). SDL3 loads it dynamicallyvia
dlopen("libusb-1.0.dylib").