Avoid overflow when converting gamepad position