Forgot to add the multiplier

This commit is contained in:
SerpentSpirale 2021-05-27 17:46:24 +02:00 committed by SerpentSpirale
parent a31331a0f1
commit bf228199e4

View File

@ -28,7 +28,7 @@ public class GamepadJoystick {
this.horizontalAxis = horizontalAxis; this.horizontalAxis = horizontalAxis;
//Some controllers aren't recognized as such by android, so we fallback to a default value of 0.2 //Some controllers aren't recognized as such by android, so we fallback to a default value of 0.2
try { deadzone = Math.max(device.getMotionRange(verticalAxis).getFlat(), device.getMotionRange(horizontalAxis).getFlat()); } try { deadzone = Math.max(device.getMotionRange(verticalAxis).getFlat(), device.getMotionRange(horizontalAxis).getFlat()) * 1.9f; }
catch (NullPointerException e){ deadzone = 0.2f; } catch (NullPointerException e){ deadzone = 0.2f; }
if(deadzone < 0.15) deadzone = 0.15f; if(deadzone < 0.15) deadzone = 0.15f;