Skip to content

Commit 3ad9a3f

Browse files
committed
InputManager: add trigger deadzone
1 parent bb37e9c commit 3ad9a3f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/input_manager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ class GamepadSource : public InputSource
9696
deadzone = (StickRange * Settings::SteeringDeadZone);
9797
else if (axis_ == SDL_GAMEPAD_AXIS_RIGHTX || axis_ == SDL_GAMEPAD_AXIS_RIGHTY)
9898
deadzone = (StickRange * RStickDeadzone);
99+
else
100+
deadzone = XINPUT_GAMEPAD_TRIGGER_THRESHOLD;
99101

100102
if (abs(raw) < deadzone)
101103
raw = 0;

0 commit comments

Comments
 (0)