Fixed an issue where axes would not detect left or up

This commit is contained in:
Ishaan Bhardwaj
2021-03-07 16:03:02 -05:00
parent dc764b9177
commit 6ecea7edb1
3 changed files with 4 additions and 184 deletions

View File

@@ -229,7 +229,7 @@ function love.joystickaxis(joystick, axis, value)
config.input.joysticks[joystick:getName()].axes[axis]
then
if math.abs(value) >= 1 then
input_pressed = config.input.joysticks[joystick:getName()].axes[axis][value >= 0.5 and "positive" or "negative"]
input_pressed = config.input.joysticks[joystick:getName()].axes[axis][value >= 1 and "positive" or "negative"]
end
positive_released = config.input.joysticks[joystick:getName()].axes[axis].positive
negative_released = config.input.joysticks[joystick:getName()].axes[axis].negative