We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5049

Summary: HORI Wireless Switch Pad does not connect properly via Bluetooth
Product: SDL Reporter: bluenaxela+sdl
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2    
Version: 2.0.10   
Hardware: x86   
OS: Windows 7   

Description bluenaxela+sdl 2020-03-21 00:11:00 UTC
The HORI Wireless Switch Pad does not properly connect via bluetooth. I did some debugging and found that the code that tries to control the Home LED causes this controller to disconnect.

This controller has no Home LED anyway, so it seems a good fix is adding the following code to HIDAPI_DriverSwitch_OpenJoystick in SDL_hidapi_switch.c right after the place that currently sets m_bHasHomeLED:

        /* The HORI Wireless Switch Pad doesn't have a Home LED and will not connect properly if
         * you try to set it
         */
        if (device->vendor_id == 0x0f0d && device->product_id == 0x00f6) {
            ctx->m_bHasHomeLED = SDL_FALSE;
        }


Note that though I selected "2.0.10" it also applies to "2.0.12" which wasn't selectable as a version in Bugzilla. It also appears to apply to the latest HG version.
Comment 1 Sam Lantinga 2020-03-21 03:45:48 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/6814f6645eb2