Skip to content

Commit

Permalink
add g29 support
Browse files Browse the repository at this point in the history
  • Loading branch information
gewentao authored and jackhumbert committed Nov 27, 2017
1 parent 85f3e02 commit 34fff2c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions WheelSupports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ bool ConfigDevice(IOHIDDeviceRef hidDevice, DeviceID deviceID, const DeviceMode
return ConfigLogitechWheels(hidDevice, deviceID, true, mode);
case kGPLogitechG27Native:
printf("Logitech G27 Native mode enabled.\n");
return ConfigLogitechWheels(hidDevice, deviceID, true, mode);
case kGPLogitechG29Native:
printf("Logitech G29 Native mode enabled.\n");
return ConfigLogitechWheels(hidDevice, deviceID, true, mode);
case kGPLogitechDFGTNative:
printf("Logitech Driving Force GT Native mode enabled.\n");
Expand Down Expand Up @@ -221,6 +224,11 @@ bool ConfigLogitechWheels(IOHIDDeviceRef hidDevice, DeviceID deviceID, bool nati
{
targetDeviceID = kGPLogitechG27Native;
printf("Logitech G27 Native mode enabled.\n");
}
else if(CFStringFind(productID, CFSTR(kGPLogitechG29ProductID), 0).location == 0)
{
targetDeviceID = kGPLogitechG29Native;
printf("Logitech G29 Native mode enabled.\n");
}
else if(CFStringFind(productID, CFSTR(kGPLogitechDFGTProductID), 0).location == 0)
{
Expand Down Expand Up @@ -308,6 +316,7 @@ void GetCmdLogitechWheelNative(CCommands *c, const DeviceID deviceID)
c->count = 1;
break;
case kGPLogitechG27Native:
case kGPLogitechG29Native:


// Original commands
Expand Down Expand Up @@ -399,6 +408,7 @@ void GetCmdLogitechWheelRange(CCommands *c, const DeviceID deviceID, int range)
switch (deviceID) {
case kGPLogitechG25Native:
case kGPLogitechG27Native:
case kGPLogitechG29Native:
case kGPLogitechDFGTNative:
{
c->cmds[0][0] = 0xf8;
Expand Down
2 changes: 2 additions & 0 deletions WheelSupports.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@
#define kGPLogitechWheelRestricted 0xc294046d
#define kGPLogitechG25Native 0xc299046d
#define kGPLogitechG27Native 0xc29b046d
#define kGPLogitechG29Native 0xc24f046d
#define kGPLogitechDFGTNative 0xc29a046d
#define kGPLogitechDFPNative 0xc298046d
#define kGPLogitechG920Native 0xc261046d

// Product IDs
#define kGPLogitechG25ProductID "G25"
#define kGPLogitechG27ProductID "G27"
#define kGPLogitechG29ProductID "G29"
#define kGPLogitechDFGTProductID "Driving Force GT"
#define kGPLogitechDFPProductID "Driving Force Pro"
#define kGPLogitechG920ProductID "G920"
Expand Down

0 comments on commit 34fff2c

Please sign in to comment.