Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/VoodooPS2Trackpad/VoodooPS2SynapticsTouchPad.cpp b/VoodooPS2Trackpad/VoodooPS2SynapticsTouchPad.cpp
index 7e667da..8e5f535 100644
--- a/VoodooPS2Trackpad/VoodooPS2SynapticsTouchPad.cpp
+++ b/VoodooPS2Trackpad/VoodooPS2SynapticsTouchPad.cpp
@@ -1432,6 +1432,23 @@ void ApplePS2SynapticsTouchPad::dispatchEventsWithPacket(UInt8* packet, UInt32 p
yraw = yraw * xupmm / yupmm;
int z = packet[2];
int f = z>z_finger ? w>=4 ? 1 : w+2 : 0; // number of fingers
+
+ // theracermaster: When DynamicEWMode is set, enable EW mode for 3/4 finger gestures
+ if (_dynamicEW && _extendedwmodeSupported)
+ {
+ if (!_extendedwmode && f > 2)
+ {
+ setModeByte(_touchPadModeByte | (1<<2));
+ _extendedwmode = true;
+ }
+ // Disable EW mode for 1/2 fingers
+ else if (_extendedwmode && f <= 2)
+ {
+ setModeByte(_touchPadModeByte & ~(1<<2));
+ _extendedwmode = false;
+ }
+ }
+
////int v = w; // v is not currently used... but maybe should be using it
if (_extendedwmode && _reportsv && f > 1)
{
@@ -3607,4 +3624,3 @@ bool ApplePS2SynapticsTouchPad::setTouchpadLED(UInt8 touchLED)
return 12 == request.commandsCount;
}
-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.