Skip to content

Commit 264eb8d

Browse files
committed
Fixed the Bluetooth flag for the combined Joy-Con controller
1 parent 05f779f commit 264eb8d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/joystick/hidapi/SDL_hidapijoystick.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,11 @@ static bool HIDAPI_CreateCombinedJoyCons(void)
10651065
info.usage = USB_USAGE_GENERIC_GAMEPAD;
10661066
info.manufacturer_string = L"Nintendo";
10671067
info.product_string = L"Switch Joy-Con (L/R)";
1068+
if (children[0]->is_bluetooth || children[1]->is_bluetooth) {
1069+
info.bus_type = SDL_HID_API_BUS_BLUETOOTH;
1070+
} else {
1071+
info.bus_type = SDL_HID_API_BUS_USB;
1072+
}
10681073

10691074
combined = HIDAPI_AddDevice(&info, 2, children);
10701075
if (combined && combined->driver) {

0 commit comments

Comments
 (0)