fixes a11a7017a
This commit is contained in:
YoshiRulz 2020-08-30 05:52:50 +10:00
parent e5a4bdb0eb
commit dc7f5ef7a2
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 1 additions and 1 deletions

View File

@ -69,8 +69,8 @@ namespace BizHawk.Client.Common
value *= kvp.Value.Mult;
// -1..1 -> range
value += range.Mid;
value *= Math.Max(range.Mid - range.Min, range.Max - range.Mid);
value += range.Mid;
// finally, constrain to range again in case the original value was unexpectedly large, or the deadzone and scale made it so, or the axis is lopsided
_axes[kvp.Key] = ((int) value).ConstrainWithin(range.Range);