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 - HORI Wireless Switch Pad does not connect properly via Bluetooth
Summary: HORI Wireless Switch Pad does not connect properly via Bluetooth
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 2.0.10
Hardware: x86 Windows 7
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-21 00:11 UTC by bluenaxela+sdl
Modified: 2020-03-21 03:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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