Skip to content

Commit

Permalink
Revert to SPI touchpad and check version
Browse files Browse the repository at this point in the history
  • Loading branch information
1Revenger1 committed Jun 12, 2024
1 parent 57aeefa commit 74f3a38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

#include "VoodooInputActuatorDevice.hpp"
#include <libkern/version.h>

#define super IOHIDDevice
OSDefineMetaClassAndStructors(VoodooInputActuatorDevice, IOHIDDevice);
Expand Down Expand Up @@ -43,7 +44,8 @@ OSNumber* VoodooInputActuatorDevice::newPrimaryUsagePageNumber() const {
}

OSNumber* VoodooInputActuatorDevice::newProductIDNumber() const {
return OSNumber::withNumber(0x265, 32);
constexpr int Sequoia = 24;
return OSNumber::withNumber(version_major >= Sequoia ? 0x281 : 0x272, 32);
}

OSString* VoodooInputActuatorDevice::newProductString() const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <IOKit/IOWorkLoop.h>
#include <IOKit/IOCommandGate.h>
#include <libkern/version.h>

#define super IOHIDDevice
OSDefineMetaClassAndStructors(VoodooInputSimulatorDevice, IOHIDDevice);
Expand Down Expand Up @@ -501,7 +502,8 @@ OSNumber* VoodooInputSimulatorDevice::newPrimaryUsagePageNumber() const {
}

OSNumber* VoodooInputSimulatorDevice::newProductIDNumber() const {
return OSNumber::withNumber(0x265, 32);
constexpr int Sequoia = 24;
return OSNumber::withNumber(version_major >= Sequoia ? 0x281 : 0x272, 32);
}

OSString* VoodooInputSimulatorDevice::newProductString() const {
Expand Down

0 comments on commit 74f3a38

Please sign in to comment.