diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2022-04-22 08:58:38 -0700 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2022-04-22 09:56:47 -0700 |
| commit | 12cd81bdb3e9d72f8a9abb430342ab9532e7dab1 (patch) | |
| tree | 3b3c3690d8b2a57b48ab4d624749648dbc64460e /Source/Core/InputCommon/GCAdapter.cpp | |
| parent | 5cd3cf9072a6e75d5d047e66f6d3ce356ec9bf4f (diff) | |
GCAdapter: don't call libusb_detach_kernel_driver on apple
Diffstat (limited to 'Source/Core/InputCommon/GCAdapter.cpp')
| -rw-r--r-- | Source/Core/InputCommon/GCAdapter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/GCAdapter.cpp b/Source/Core/InputCommon/GCAdapter.cpp index 6c6e4933bc..209594a59c 100644 --- a/Source/Core/InputCommon/GCAdapter.cpp +++ b/Source/Core/InputCommon/GCAdapter.cpp @@ -339,8 +339,12 @@ static bool CheckDeviceAccess(libusb_device* device) ret = libusb_kernel_driver_active(s_handle, 0); if (ret == 1) { + // On macos detaching would fail without root or entitlement. + // We assume user is using GCAdapterDriver and therefor don't want to detach anything +#if !defined(__APPLE__) ret = libusb_detach_kernel_driver(s_handle, 0); detach_failed = ret < 0 && ret != LIBUSB_ERROR_NOT_FOUND && ret != LIBUSB_ERROR_NOT_SUPPORTED; +#endif if (detach_failed) ERROR_LOG_FMT(CONTROLLERINTERFACE, "libusb_detach_kernel_driver failed with error: {}", ret); } |
