diff --git a/FreeTheWheel b/FreeTheWheel index 2894e5c..0d368a2 100755 Binary files a/FreeTheWheel and b/FreeTheWheel differ diff --git a/README.md b/README.md index 8293f4c..2045a68 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,14 @@ Free The Wheel for OS X Logitech driving wheel enabler based on [Feral Interactive's FreeTheWheel](http://support.feralinteractive.com/en/faqs/free_the_wheel/) +## OS X Catalina + +This is a fork of [jackhumbert's FreeTheWheel](https://github.com/jackhumbert/FreeTheWheel). +I just made it to work on OS X Catalina. As far is I know, it works for the following wheels. Please let me know if your wheel works! + +* G27 +* Driving Force GT + ## Features for the G27 * Full 900˚ Rotation diff --git a/WheelSupports.cpp b/WheelSupports.cpp index d60bcfd..203745b 100644 --- a/WheelSupports.cpp +++ b/WheelSupports.cpp @@ -7,6 +7,7 @@ // #include +#include #include "WheelSupports.h" //============================================================================= @@ -116,12 +117,30 @@ bool ConfigDevice(IOHIDDeviceRef hidDevice, DeviceID deviceID, const DeviceMode IOReturn OpenDevice(IOHIDDeviceRef hidDevice) { IOReturn result = IOHIDDeviceOpen(hidDevice, kIOHIDOptionsTypeSeizeDevice); - if(result != kIOReturnSuccess) - { - printf("ERROR: OpenDevice failed with result: %x\n", result); - return result; - } - return kIOReturnSuccess; + std::string msg = ""; + + switch(result) { + case kIOReturnError: msg = "general error"; break; + case kIOReturnNoMemory: msg = "can't allocate memory"; break; + case kIOReturnNoResources: msg = "resource shortage"; break; + case kIOReturnIPCError: msg = "error during IPC"; break; + case kIOReturnNoDevice: msg = "no such device"; break; + case kIOReturnNotPrivileged: msg = "privilege violation"; break; + case kIOReturnBadArgument: msg = "invalid argument"; break; + case kIOReturnLockedRead: msg = "device read locked"; break; + case kIOReturnLockedWrite: msg = "device write locked"; break; + //case kIOReturnExclusiveAccess: msg = "exclusive access and device already open"; break; // Common error on macOS Catalina with DFGT + case kIOReturnBadMessageID: msg = "sent/received messages had different msg_id"; break; + case kIOReturnUnsupported: msg = "unsupported function"; break; + case kIOReturnVMError: msg = "misc. VM failure"; break; + } + + if(msg != "") { + printf("Error: OpenDevice failed - %s - (%x)\n", msg.c_str(), result); + return result; + + } + return kIOReturnSuccess; }