From 55a3859891edcbc4e52d23804f3d998e744efe0c Mon Sep 17 00:00:00 2001 From: Dniel97 Date: Wed, 6 Aug 2025 19:40:04 +0200 Subject: [PATCH] [swdc] fix magnitude calculation --- games/swdcio/xi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/swdcio/xi.c b/games/swdcio/xi.c index 7a6984a3..0556b6bc 100644 --- a/games/swdcio/xi.c +++ b/games/swdcio/xi.c @@ -179,7 +179,7 @@ static int16_t calculate_norm_steering(int16_t axis, uint16_t deadzone, bool lin // optionally normalize the magnitude with respect to its expected range // giving a magnitude value of 0.0 to 1.0 - norm_magnitude = (int16_t)(magnitude / (max_stick_value - deadzone)); + norm_magnitude = (magnitude / (max_stick_value - deadzone)); } else // if the controller is in the deadzone zero out the magnitude { magnitude = 0.0;