mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-25 22:41:16 +01:00
Remove some unneeded checks
This commit is contained in:
parent
9cfae83569
commit
51dfa8b91b
@ -474,9 +474,10 @@ namespace DS4Windows
|
|||||||
if (eastertime)
|
if (eastertime)
|
||||||
EasterTime(ind);
|
EasterTime(ind);
|
||||||
GetInputkeys(ind);
|
GetInputkeys(ind);
|
||||||
if (LSCurve[ind] != 0 || RSCurve[ind] != 0 || LSDeadzone[ind] != 0 || RSDeadzone[ind] != 0 ||
|
/*if (LSCurve[ind] != 0 || RSCurve[ind] != 0 || LSDeadzone[ind] != 0 || RSDeadzone[ind] != 0 ||
|
||||||
L2Deadzone[ind] != 0 || R2Deadzone[ind] != 0 || LSSens[ind] != 0 || RSSens[ind] != 0 ||
|
L2Deadzone[ind] != 0 || R2Deadzone[ind] != 0 || LSSens[ind] != 0 || RSSens[ind] != 0 ||
|
||||||
L2Sens[ind] != 0 || R2Sens[ind] != 0) //if a curve or deadzone is in place
|
L2Sens[ind] != 0 || R2Sens[ind] != 0) //if a curve or deadzone is in place
|
||||||
|
*/
|
||||||
cState = Mapping.SetCurveAndDeadzone(ind, cState);
|
cState = Mapping.SetCurveAndDeadzone(ind, cState);
|
||||||
if (!recordingMacro && (!string.IsNullOrEmpty(tempprofilename[ind]) ||
|
if (!recordingMacro && (!string.IsNullOrEmpty(tempprofilename[ind]) ||
|
||||||
HasCustomAction(ind) || HasCustomExtras(ind) || ProfileActions[ind].Count > 0))
|
HasCustomAction(ind) || HasCustomExtras(ind) || ProfileActions[ind].Count > 0))
|
||||||
|
@ -448,10 +448,11 @@ namespace DS4Windows
|
|||||||
dState.RY = (byte)Math.Round(curvey, 0);
|
dState.RY = (byte)Math.Round(curvey, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
double lsSquared = Math.Pow(cState.LX - 127.5f, 2) + Math.Pow(cState.LY - 127.5f, 2);
|
|
||||||
//deadzones
|
|
||||||
int lsDeadzone = LSDeadzone[device];
|
int lsDeadzone = LSDeadzone[device];
|
||||||
int lsAntiDead = LSAntiDeadzone[device];
|
int lsAntiDead = LSAntiDeadzone[device];
|
||||||
|
if (lsDeadzone > 0 || lsAntiDead > 0)
|
||||||
|
{
|
||||||
|
double lsSquared = Math.Pow(cState.LX - 127.5f, 2) + Math.Pow(cState.LY - 127.5f, 2);
|
||||||
double lsDeadzoneSquared = Math.Pow(lsDeadzone, 2);
|
double lsDeadzoneSquared = Math.Pow(lsDeadzone, 2);
|
||||||
if (lsDeadzone > 0 && lsSquared <= lsDeadzoneSquared)
|
if (lsDeadzone > 0 && lsSquared <= lsDeadzoneSquared)
|
||||||
{
|
{
|
||||||
@ -506,10 +507,13 @@ namespace DS4Windows
|
|||||||
//dState.LX = (byte)(Math.Cos(r) * (127.5f + LSDeadzone[device]) + 127.5f);
|
//dState.LX = (byte)(Math.Cos(r) * (127.5f + LSDeadzone[device]) + 127.5f);
|
||||||
//dState.LY = (byte)(Math.Sin(r) * (127.5f + LSDeadzone[device]) + 127.5f);
|
//dState.LY = (byte)(Math.Sin(r) * (127.5f + LSDeadzone[device]) + 127.5f);
|
||||||
}
|
}
|
||||||
//Console.WriteLine
|
}
|
||||||
double rsSquared = Math.Pow(cState.RX - 127.5f, 2) + Math.Pow(cState.RY - 127.5f, 2);
|
|
||||||
int rsDeadzone = RSDeadzone[device];
|
int rsDeadzone = RSDeadzone[device];
|
||||||
int rsAntiDead = RSAntiDeadzone[device];
|
int rsAntiDead = RSAntiDeadzone[device];
|
||||||
|
if (rsDeadzone > 0 || rsAntiDead > 0)
|
||||||
|
{
|
||||||
|
double rsSquared = Math.Pow(cState.RX - 127.5f, 2) + Math.Pow(cState.RY - 127.5f, 2);
|
||||||
double rsDeadzoneSquared = Math.Pow(rsDeadzone, 2);
|
double rsDeadzoneSquared = Math.Pow(rsDeadzone, 2);
|
||||||
if (rsDeadzone > 0 && rsSquared <= rsDeadzoneSquared)
|
if (rsDeadzone > 0 && rsSquared <= rsDeadzoneSquared)
|
||||||
{
|
{
|
||||||
@ -566,6 +570,7 @@ namespace DS4Windows
|
|||||||
//dState.RX = (byte)(Math.Cos(r) * (127.5f + RSDeadzone[device]) + 127.5f);
|
//dState.RX = (byte)(Math.Cos(r) * (127.5f + RSDeadzone[device]) + 127.5f);
|
||||||
//dState.RY = (byte)(Math.Sin(r) * (127.5f + RSDeadzone[device]) + 127.5f);
|
//dState.RY = (byte)(Math.Sin(r) * (127.5f + RSDeadzone[device]) + 127.5f);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
byte l2Deadzone = L2Deadzone[device];
|
byte l2Deadzone = L2Deadzone[device];
|
||||||
if (l2Deadzone > 0)
|
if (l2Deadzone > 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user