Added unsafe back to sixaxis method

This commit is contained in:
Travis Nickles 2018-07-22 02:52:42 -05:00
parent 1c76de4ba1
commit a6e6b5279c
2 changed files with 3 additions and 3 deletions

View File

@ -981,9 +981,9 @@ namespace DS4Windows
{ {
pbAccel[i-6] = pbInput[i]; pbAccel[i-6] = pbInput[i];
} }
}
sixAxis.handleSixaxis(gyro, accel, cState, elapsedDeltaTime); sixAxis.handleSixaxis(pbGyro, pbAccel, cState, elapsedDeltaTime);
}
/* Debug output of incoming HID data: /* Debug output of incoming HID data:
if (cState.L2 == 0xff && cState.R2 == 0xff) if (cState.L2 == 0xff && cState.R2 == 0xff)

View File

@ -220,7 +220,7 @@ namespace DS4Windows
accelZ = temInt = (int)(temInt * (current.sensNumer / (float)current.sensDenom)); 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) double elapsedDelta)
{ {
int currentYaw = (short)((ushort)(gyro[3] << 8) | gyro[2]); int currentYaw = (short)((ushort)(gyro[3] << 8) | gyro[2]);