From dad19aa2ade8baad22f312cbea7f25047aa2e943 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 22 Dec 2021 23:43:03 +0900 Subject: [PATCH] [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). --- libs/input/in_imt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/input/in_imt.c b/libs/input/in_imt.c index d64fc7a1d..2d1d1f5b3 100644 --- a/libs/input/in_imt.c +++ b/libs/input/in_imt.c @@ -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;