调整扳机键的默认触发阈值

This commit is contained in:
MrZ626
2021-11-28 16:16:44 +08:00
parent cdf149afca
commit bc9adc2cd3

View File

@@ -395,7 +395,7 @@ function love.gamepadaxis(JS,axis,val)
js[axis]=newVal
end
elseif axis=='triggerleft'or axis=='triggerright'then
local newVal=val>-.3 and 1 or 0--range: [-1,1]
local newVal=val>.3 and 1 or 0--range: [0,1]
if newVal~=js[axis]then
if newVal==1 then
love.gamepadpressed(JS,jsAxisEventName[axis])