mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-16 12:08:52 +00:00
nsyshid/libusb: Don't attempt kernel driver detach on MacOS (#1736)
This commit is contained in:
parent
85c8f95b69
commit
bb3fb81fb6
@ -763,6 +763,9 @@ namespace nsyshid::backend::libusb
|
||||
int DeviceLibusb::ClaimAllInterfaces(uint8 config_num)
|
||||
{
|
||||
const int ret = DoForEachInterface(m_config_descriptors, config_num, [this](uint8 i) {
|
||||
// On macos detaching would fail without root or entitlement.
|
||||
// We assume user is using GCAdapterDriver and therefore don't want to detach anything
|
||||
#if !defined(__APPLE__)
|
||||
if (libusb_kernel_driver_active(this->m_libusbHandle, i))
|
||||
{
|
||||
const int ret2 = libusb_detach_kernel_driver(this->m_libusbHandle, i);
|
||||
@ -773,6 +776,7 @@ namespace nsyshid::backend::libusb
|
||||
return ret2;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return libusb_claim_interface(this->m_libusbHandle, i);
|
||||
});
|
||||
if (ret < LIBUSB_SUCCESS)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user