Disable descriptor check for BT passthrough in some cases #4385
Conversation
@@ -45,6 +45,19 @@ static bool IsWantedDevice(libusb_device_descriptor& descriptor) | |||
return descriptor.idVendor == vid && descriptor.idProduct == pid; | |||
} | |||
|
|||
constexpr u8 SUBCLASS = 0x01; | |||
constexpr u8 PROTOCOL_BLUETOOTH = 0x01; |
lioncash
Oct 25, 2016
Member
These constants can go inside IsBluetoothDevice
.
These constants can go inside IsBluetoothDevice
.
With this change I was able to use an Asus BT-400 (VID_0B05&PID_17CB&REV_0112) successfully with a 3rd party WiiMote. Previously it would refuse to use the adapter. |
Some adapters don't have the correct interface class, so they are not recognised as Bluetooth adapters. It seems that apart from hardcoding VIDs/PIDs (which is how it's done in the Linux kernel, and which I'm not very fond of), there is no other way to detect if a device is a Bluetooth adapter or not. This change makes Dolphin skip the descriptor check when trying to find a usable adapter for Bluetooth Passthrough if the use of a specific adapter was forced; it is assumed that the user knows what they are doing if they hand-edited their config file. This allows such adapters to be used.
This sounds fine. Valid the type on auto detection, but accept every manually configured device. |
234691a
into
dolphin-emu:master
10 of 11 checks passed
10 of 11 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Some adapters don't have the correct interface class, so they are not recognised as Bluetooth adapters. It seems that apart from hardcoding VIDs/PIDs (which is how it's done in the Linux kernel, and which I'm not very fond of), there is no other way to detect if a device is a Bluetooth adapter or not.
So I think adding an option to disable the descriptor check is the only sane way to allow such adapters to be used.
While this solution seems best for maintainability, it's not terribly user friendly. Does someone have any better idea?
This change is