mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-02-18 17:06:19 +01:00
Revert "Use unsafe for accessing gyro and accel arrays"
This reverts commit e99e0afe17f5a6bde67d6a71739c6ab679497dbc.
This commit is contained in:
parent
e6ac109616
commit
d1f124870f
@ -983,7 +983,7 @@ namespace DS4Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fixed (byte* pGyro = gyro, pAccel = accel) sixAxis.handleSixaxis(pGyro, pAccel, cState, elapsedDeltaTime);
|
sixAxis.handleSixaxis(gyro, accel, 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)
|
||||||
|
@ -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 unsafe void handleSixaxis(byte* gyro, byte* accel, DS4State state,
|
public 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]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user