mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
XInput/DInput: Rename settings, fix sensitivity
* Change deadzone inverter naming convention to 'analog mapper' * Remove hokey mathematics from sensitivity calculations
This commit is contained in:
1 parent
4c6410cd0d
commit
929866edd3
3 files changed
+12
-12
No files matched your search
@@ -156,21 +156,21 @@ static Stick NormalizedDeadzoneFilter(short x, short y, float dz, int idzm, floa
|
||||
{
|
||||
float xSign = Signf(s.x);
|
||||
if (xSign != 0.0f) {
|
||||
s.x = LinearMapf(s.x, xSign * dz, xSign, xSign * md, (xSign * st) - md);
|
||||
s.x = LinearMapf(s.x, xSign * dz, xSign, xSign * md, xSign * st);
|
||||
}
|
||||
}
|
||||
else if (idzm == 2)
|
||||
{
|
||||
float ySign = Signf(s.y);
|
||||
if (ySign != 0.0f) {
|
||||
s.y = LinearMapf(s.y, ySign * dz, ySign, ySign * md, (ySign * st) - md);
|
||||
s.y = LinearMapf(s.y, ySign * dz, ySign, ySign * md, ySign * st);
|
||||
}
|
||||
}
|
||||
else if (idzm == 3)
|
||||
{
|
||||
float xNorm = s.x / magnitude;
|
||||
float yNorm = s.y / magnitude;
|
||||
float mapMag = LinearMapf(magnitude, dz, 1.0f, md, (1.0f * st) - md);
|
||||
float mapMag = LinearMapf(magnitude, dz, 1.0f, md, st);
|
||||
s.x = xNorm * mapMag;
|
||||
s.y = yNorm * mapMag;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user