From 74f3a389cceef26db672c7311241100610b0b47f Mon Sep 17 00:00:00 2001 From: Avery Black Date: Wed, 12 Jun 2024 08:35:25 -0700 Subject: [PATCH] Revert to SPI touchpad and check version --- .../VoodooInputSimulator/VoodooInputActuatorDevice.cpp | 4 +++- .../VoodooInputSimulator/VoodooInputSimulatorDevice.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/VoodooInput/VoodooInputSimulator/VoodooInputActuatorDevice.cpp b/VoodooInput/VoodooInputSimulator/VoodooInputActuatorDevice.cpp index 69953f2..0a8eb5b 100644 --- a/VoodooInput/VoodooInputSimulator/VoodooInputActuatorDevice.cpp +++ b/VoodooInput/VoodooInputSimulator/VoodooInputActuatorDevice.cpp @@ -6,6 +6,7 @@ // #include "VoodooInputActuatorDevice.hpp" +#include #define super IOHIDDevice OSDefineMetaClassAndStructors(VoodooInputActuatorDevice, IOHIDDevice); @@ -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 { diff --git a/VoodooInput/VoodooInputSimulator/VoodooInputSimulatorDevice.cpp b/VoodooInput/VoodooInputSimulator/VoodooInputSimulatorDevice.cpp index 9c4293a..2dba054 100644 --- a/VoodooInput/VoodooInputSimulator/VoodooInputSimulatorDevice.cpp +++ b/VoodooInput/VoodooInputSimulator/VoodooInputSimulatorDevice.cpp @@ -11,6 +11,7 @@ #include #include +#include #define super IOHIDDevice OSDefineMetaClassAndStructors(VoodooInputSimulatorDevice, IOHIDDevice); @@ -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 {