From fed4aef039625e018c4a83b3987e43402c9ce917 Mon Sep 17 00:00:00 2001 From: Stan Verberkt Date: Thu, 30 Apr 2020 17:34:40 +0200 Subject: [PATCH] Check for kIOReturnError instead of Success --- WheelSupports.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WheelSupports.cpp b/WheelSupports.cpp index d60bcfd..1fb13fa 100644 --- a/WheelSupports.cpp +++ b/WheelSupports.cpp @@ -116,7 +116,7 @@ bool ConfigDevice(IOHIDDeviceRef hidDevice, DeviceID deviceID, const DeviceMode IOReturn OpenDevice(IOHIDDeviceRef hidDevice) { IOReturn result = IOHIDDeviceOpen(hidDevice, kIOHIDOptionsTypeSeizeDevice); - if(result != kIOReturnSuccess) + if(result == kIOReturnError) { printf("ERROR: OpenDevice failed with result: %x\n", result); return result;