mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-26 16:41:50 +01:00
Steering wheel emulation for the new dualshock4 controller option. Fine tuned anti-deadzone calculation for DS4 output controller.
This commit is contained in:
parent
8a561d1cde
commit
02f66981a7
@ -4087,8 +4087,8 @@ namespace DS4Windows
|
||||
if (sxAntiDead > 0)
|
||||
{
|
||||
sxAntiDead *= (outputAxisMax - outputAxisZero);
|
||||
if (result < 0) return (((result - maxRangeLeft) * (-Convert.ToInt32(sxAntiDead) - (outputAxisMin))) / (0 - maxRangeLeft)) + (outputAxisMin);
|
||||
else return (((result - 0) * (outputAxisMax - (Convert.ToInt32(sxAntiDead)))) / (maxRangeRight - 0)) + (Convert.ToInt32(sxAntiDead));
|
||||
if (result < 0) return (((result - maxRangeLeft) * (outputAxisZero - Convert.ToInt32(sxAntiDead) - (outputAxisMin))) / (0 - maxRangeLeft)) + (outputAxisMin);
|
||||
else return (((result - 0) * (outputAxisMax - (outputAxisZero + Convert.ToInt32(sxAntiDead)))) / (maxRangeRight - 0)) + (outputAxisZero + Convert.ToInt32(sxAntiDead));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user