Skip to content

Commit

Permalink
Check for kIOReturnError instead of Success
Browse files Browse the repository at this point in the history
  • Loading branch information
verberktstan authored Apr 30, 2020
1 parent 34fff2c commit fed4aef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WheelSupports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fed4aef

Please sign in to comment.