mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 17:06:25 +00:00
Fixed opening one Joy-Con when the other is visible but disconnected
This can happen on Windows when the controller is turned off directly. It still shows up in the device list and you can send packets to it, but it's off and doesn't respond. We'll mark this device as broken and open the other as a single Joy-Con.
This commit is contained in:
@@ -2727,6 +2727,7 @@ static bool HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device)
|
||||
|
||||
// Reconnect the Bluetooth device once the USB device is gone
|
||||
if (device->num_joysticks == 0 && device->is_bluetooth && packet_count > 0 &&
|
||||
!device->parent &&
|
||||
!HIDAPI_HasConnectedUSBDevice(device->serial)) {
|
||||
HIDAPI_JoystickConnected(device, NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user