Skip to content

Commit

Permalink
Fake DS4 FrameCounter for DualSense controller
Browse files Browse the repository at this point in the history
Now using byte 7 in HID report
  • Loading branch information
Ryochan7 committed Aug 9, 2021
1 parent 98961f8 commit 13a343d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DS4Windows/DS4Library/InputDevices/DualSenseDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,8 @@ private unsafe void ReadInput()
cState.L2 = inputReport[5 + reportOffset];
cState.R2 = inputReport[6 + reportOffset];

// DS4 Frame Counter range is [0-127]. DS version range is [0-255]. Convert
cState.FrameCounter = (byte)(inputReport[7] % 128);
tempByte = inputReport[8 + reportOffset];
cState.Triangle = (tempByte & (1 << 7)) != 0;
cState.Circle = (tempByte & (1 << 6)) != 0;
Expand Down

0 comments on commit 13a343d

Please sign in to comment.