Fixed the Bluetooth flag for the combined Joy-Con controller
(cherry picked from commit 264eb8d440)
This commit is contained in:
1 parent
ab114490fc
commit
26a1aae098
1 file changed
+5
@@ -1052,6 +1052,11 @@ static bool HIDAPI_CreateCombinedJoyCons(void)
|
|||||||
info.usage = USB_USAGE_GENERIC_GAMEPAD;
|
info.usage = USB_USAGE_GENERIC_GAMEPAD;
|
||||||
info.manufacturer_string = L"Nintendo";
|
info.manufacturer_string = L"Nintendo";
|
||||||
info.product_string = L"Switch Joy-Con (L/R)";
|
info.product_string = L"Switch Joy-Con (L/R)";
|
||||||
|
if (children[0]->is_bluetooth || children[1]->is_bluetooth) {
|
||||||
|
info.bus_type = SDL_HID_API_BUS_BLUETOOTH;
|
||||||
|
} else {
|
||||||
|
info.bus_type = SDL_HID_API_BUS_USB;
|
||||||
|
}
|
||||||
|
|
||||||
combined = HIDAPI_AddDevice(&info, 2, children);
|
combined = HIDAPI_AddDevice(&info, 2, children);
|
||||||
if (combined && combined->driver) {
|
if (combined && combined->driver) {
|
||||||
|
|||||||
Reference in new issue
Block a user