mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-28 01:21:49 +01:00
Use max displacement from center for Mouse Joystick and RS conflict
Related to issue #807
This commit is contained in:
parent
c358b39e71
commit
5ae1b8800f
@ -1874,9 +1874,25 @@ namespace DS4Windows
|
|||||||
}
|
}
|
||||||
|
|
||||||
ref byte gyroTempX = ref gyroStickX[device];
|
ref byte gyroTempX = ref gyroStickX[device];
|
||||||
if (gyroTempX != 128) MappedState.RX = gyroTempX;
|
if (gyroTempX != 128)
|
||||||
|
{
|
||||||
|
if (MappedState.RX != 128)
|
||||||
|
MappedState.RX = Math.Abs(gyroTempX - 128) > Math.Abs(MappedState.RX - 128) ?
|
||||||
|
gyroTempX : MappedState.RX;
|
||||||
|
else
|
||||||
|
MappedState.RX = gyroTempX;
|
||||||
|
}
|
||||||
|
|
||||||
ref byte gyroTempY = ref gyroStickY[device];
|
ref byte gyroTempY = ref gyroStickY[device];
|
||||||
if (gyroTempY != 128) MappedState.RY = gyroTempY;
|
if (gyroTempY != 128)
|
||||||
|
{
|
||||||
|
if (MappedState.RY != 128)
|
||||||
|
MappedState.RY = Math.Abs(gyroTempY - 128) > Math.Abs(MappedState.RY - 128) ?
|
||||||
|
gyroTempY : MappedState.RY;
|
||||||
|
else
|
||||||
|
MappedState.RY = gyroTempY;
|
||||||
|
}
|
||||||
|
|
||||||
gyroTempX = gyroTempY = 128;
|
gyroTempX = gyroTempY = 128;
|
||||||
|
|
||||||
calculateFinalMouseMovement(ref tempMouseDeltaX, ref tempMouseDeltaY,
|
calculateFinalMouseMovement(ref tempMouseDeltaX, ref tempMouseDeltaY,
|
||||||
|
Loading…
Reference in New Issue
Block a user