hidDarwinSetOpenExclusive function
Set the macOS exclusive device open mode.
When true, subsequent hidOpen and hidOpenPath calls seize the device
exclusively (kIOHIDOptionsTypeSeizeDevice). Defaults to true after
hidInit.
No-op on Linux and Windows where the symbol does not exist.
Implementation
void hidDarwinSetOpenExclusive(bool exclusive) {
try {
ffi.hid_darwin_set_open_exclusive(exclusive ? 1 : 0);
} on ArgumentError {
// Symbol not available on this platform.
}
}