diff --git a/DetectionManager.cpp b/DetectionManager.cpp index b4e3024ce..39c16ee14 100644 --- a/DetectionManager.cpp +++ b/DetectionManager.cpp @@ -24,6 +24,10 @@ #include #endif +#ifdef __APPLE__ +#include +#endif + using namespace std::chrono_literals; /*---------------------------------------------------------*\ @@ -1353,6 +1357,15 @@ void DetectionManager::BackgroundHIDInit() LOG_DEBUG("[%s] Initializing HID interfaces: %s", DETECTIONMANAGER, ((hid_status == 0) ? "Success" : "Failed")); +#ifdef __APPLE__ + /*-----------------------------------------------------*\ + | hidapi defaults macOS opens to exclusive (seize) | + | mode: privileged, and a second open of a held device | + | fails. Shared matches Linux and Windows. | + \*-----------------------------------------------------*/ + hid_darwin_set_open_exclusive(0); +#endif + #ifdef __linux__ #ifdef __GLIBC__ /*-----------------------------------------------------*\