* Fix #4405 at runtime * Add parameter validation * Remove default global deadzone
This commit is contained in:
parent
75a4c5bf20
commit
7a4a84a561
1 changed files with 1 additions and 2 deletions
|
@ -3295,8 +3295,7 @@ float GetGamepadAxisMovement(int gamepad, int axis)
|
||||||
if ((gamepad < MAX_GAMEPADS) && CORE.Input.Gamepad.ready[gamepad] && (axis < MAX_GAMEPAD_AXIS)) {
|
if ((gamepad < MAX_GAMEPADS) && CORE.Input.Gamepad.ready[gamepad] && (axis < MAX_GAMEPAD_AXIS)) {
|
||||||
float movement = value < 0.0f ? CORE.Input.Gamepad.axisState[gamepad][axis] : fabsf(CORE.Input.Gamepad.axisState[gamepad][axis]);
|
float movement = value < 0.0f ? CORE.Input.Gamepad.axisState[gamepad][axis] : fabsf(CORE.Input.Gamepad.axisState[gamepad][axis]);
|
||||||
|
|
||||||
// 0.1f = GAMEPAD_AXIS_MINIMUM_DRIFT/DELTA
|
if (movement > value) value = CORE.Input.Gamepad.axisState[gamepad][axis];
|
||||||
if (movement > value + 0.1f) value = CORE.Input.Gamepad.axisState[gamepad][axis];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue