diff --git a/VS19_Solution/DualSenseWindows/include/DualSenseWindows/DS5State.h b/VS19_Solution/DualSenseWindows/include/DualSenseWindows/DS5State.h index a26604e..dd6a21c 100644 --- a/VS19_Solution/DualSenseWindows/include/DualSenseWindows/DS5State.h +++ b/VS19_Solution/DualSenseWindows/include/DualSenseWindows/DS5State.h @@ -85,6 +85,16 @@ namespace DS5W { /// Y position of finger (~ 0 - 2048) /// unsigned int y; + + /// + /// Touch is down + /// + bool down; + + /// + /// 7-bit ID for touch + /// + unsigned char id; } Touch; typedef struct _Battery { diff --git a/VS19_Solution/DualSenseWindows/src/DualSenseWindows/DS5_Input.cpp b/VS19_Solution/DualSenseWindows/src/DualSenseWindows/DS5_Input.cpp index 2ec1a51..eef4be4 100644 --- a/VS19_Solution/DualSenseWindows/src/DualSenseWindows/DS5_Input.cpp +++ b/VS19_Solution/DualSenseWindows/src/DualSenseWindows/DS5_Input.cpp @@ -62,11 +62,15 @@ void __DS5W::Input::evaluateHidInputBuffer(unsigned char* hidInBuffer, DS5W::DS5 UINT32 touchpad1Raw = *(UINT32*)(&hidInBuffer[0x20]); ptrInputState->touchPoint1.y = (touchpad1Raw & 0xFFF00000) >> 20; ptrInputState->touchPoint1.x = (touchpad1Raw & 0x000FFF00) >> 8; + ptrInputState->touchPoint1.down = (touchpad1Raw & (1 << 7)) == 0; + ptrInputState->touchPoint1.id = (touchpad1Raw & 127); // Evaluate touch state 2 UINT32 touchpad2Raw = *(UINT32*)(&hidInBuffer[0x24]); ptrInputState->touchPoint2.y = (touchpad2Raw & 0xFFF00000) >> 20; ptrInputState->touchPoint2.x = (touchpad2Raw & 0x000FFF00) >> 8; + ptrInputState->touchPoint2.down = (touchpad2Raw & (1 << 7)) == 0; + ptrInputState->touchPoint2.id = (touchpad2Raw & 127); // Evaluate headphone input ptrInputState->headPhoneConnected = hidInBuffer[0x35] & 0x01;