mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
[input] Correct balanced range calculation
Fixes axis inputs being half what they should be. Can't quite get +1, though (need to figure something out for the positive axis range being slightly smaller than the negative range).
This commit is contained in:
parent
3ffdaccd50
commit
dad19aa2ad
1 changed files with 2 additions and 2 deletions
|
@ -588,8 +588,8 @@ IMT_ProcessAxis (int axis, int value)
|
|||
if (recipe->deadzone >= 0) {
|
||||
// balanced axis: -1..1
|
||||
int center = (recipe->min + recipe->max + 1) / 2;
|
||||
minval += deadzone - center;
|
||||
maxval -= deadzone + center;
|
||||
minval += deadzone;
|
||||
maxval -= deadzone;
|
||||
input -= center;
|
||||
if (input < -deadzone) {
|
||||
input += deadzone;
|
||||
|
|
Loading…
Reference in a new issue