From a6e6b5279c87ed4d8bb5693d23673db2ea19b3d8 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sun, 22 Jul 2018 02:52:42 -0500 Subject: [PATCH] Added unsafe back to sixaxis method --- DS4Windows/DS4Library/DS4Device.cs | 4 ++-- DS4Windows/DS4Library/DS4Sixaxis.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DS4Windows/DS4Library/DS4Device.cs b/DS4Windows/DS4Library/DS4Device.cs index b52444b..368de7c 100644 --- a/DS4Windows/DS4Library/DS4Device.cs +++ b/DS4Windows/DS4Library/DS4Device.cs @@ -981,9 +981,9 @@ namespace DS4Windows { pbAccel[i-6] = pbInput[i]; } - } - sixAxis.handleSixaxis(gyro, accel, cState, elapsedDeltaTime); + sixAxis.handleSixaxis(pbGyro, pbAccel, cState, elapsedDeltaTime); + } /* Debug output of incoming HID data: if (cState.L2 == 0xff && cState.R2 == 0xff) diff --git a/DS4Windows/DS4Library/DS4Sixaxis.cs b/DS4Windows/DS4Library/DS4Sixaxis.cs index 62353b5..8da297e 100644 --- a/DS4Windows/DS4Library/DS4Sixaxis.cs +++ b/DS4Windows/DS4Library/DS4Sixaxis.cs @@ -220,7 +220,7 @@ namespace DS4Windows accelZ = temInt = (int)(temInt * (current.sensNumer / (float)current.sensDenom)); } - public void handleSixaxis(byte[] gyro, byte[] accel, DS4State state, + public unsafe void handleSixaxis(byte* gyro, byte* accel, DS4State state, double elapsedDelta) { int currentYaw = (short)((ushort)(gyro[3] << 8) | gyro[2]);