mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-24 14:01:16 +01:00
Updated midpoint for gyro to axis calculations
This commit is contained in:
parent
c0788ab98d
commit
1faa29962e
@ -3776,7 +3776,7 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
if (sOff == false && fieldMap.gryodirs[controlNum] > 0)
|
if (sOff == false && fieldMap.gryodirs[controlNum] > 0)
|
||||||
{
|
{
|
||||||
if (alt) result = (byte)Math.Min(255, 127 + fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - fieldMap.gryodirs[controlNum]);
|
if (alt) result = (byte)Math.Min(255, 128 + fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 128 - fieldMap.gryodirs[controlNum]);
|
||||||
}
|
}
|
||||||
else result = falseVal;
|
else result = falseVal;
|
||||||
break;
|
break;
|
||||||
@ -3785,7 +3785,7 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
if (sOff == false && fieldMap.gryodirs[controlNum] < 0)
|
if (sOff == false && fieldMap.gryodirs[controlNum] < 0)
|
||||||
{
|
{
|
||||||
if (alt) result = (byte)Math.Min(255, 127 + -fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - -fieldMap.gryodirs[controlNum]);
|
if (alt) result = (byte)Math.Min(255, 128 + -fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 128 - -fieldMap.gryodirs[controlNum]);
|
||||||
}
|
}
|
||||||
else result = falseVal;
|
else result = falseVal;
|
||||||
break;
|
break;
|
||||||
@ -3794,7 +3794,7 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
if (sOff == false && fieldMap.gryodirs[controlNum] > 0)
|
if (sOff == false && fieldMap.gryodirs[controlNum] > 0)
|
||||||
{
|
{
|
||||||
if (alt) result = (byte)Math.Min(255, 127 + fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - fieldMap.gryodirs[controlNum]);
|
if (alt) result = (byte)Math.Min(255, 128 + fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 128 - fieldMap.gryodirs[controlNum]);
|
||||||
}
|
}
|
||||||
else return falseVal;
|
else return falseVal;
|
||||||
break;
|
break;
|
||||||
@ -3803,7 +3803,7 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
if (sOff == false && fieldMap.gryodirs[controlNum] < 0)
|
if (sOff == false && fieldMap.gryodirs[controlNum] < 0)
|
||||||
{
|
{
|
||||||
if (alt) result = (byte)Math.Min(255, 127 + -fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 127 - -fieldMap.gryodirs[controlNum]);
|
if (alt) result = (byte)Math.Min(255, 128 + -fieldMap.gryodirs[controlNum]); else result = (byte)Math.Max(0, 128 - -fieldMap.gryodirs[controlNum]);
|
||||||
}
|
}
|
||||||
else result = falseVal;
|
else result = falseVal;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user