1
0
Fork 0
mirror of https://github.com/Reuh/ubiquitousse.git synced 2025-10-27 17:19:31 +00:00

Fix triggeringTrigger, improve gamepad handling

This commit is contained in:
Étienne Fildadut 2020-04-06 17:28:26 +02:00
parent d85424d866
commit 1ec81f2ebb
2 changed files with 94 additions and 46 deletions

View file

@ -192,7 +192,7 @@ local axis_mt = {
local hijacked
hijacked = setmetatable({
positive = input.button(function() return hijacked:value() > self.triggeringThreshold end),
negative = input.button(function() return hijacked:value() < self.triggeringThreshold end)
negative = input.button(function() return hijacked:value() < -self.triggeringThreshold end)
}, { __index = self, __newindex = self })
table.insert(self.hijackStack, hijacked)
self.hijacking = hijacked
@ -625,7 +625,7 @@ input = {
r.hijacking = r
r:bind(...)
r.positive = input.button(function() return r:value() > r.triggeringThreshold end)
r.negative = input.button(function() return r:value() < r.triggeringThreshold end)
r.negative = input.button(function() return r:value() < -r.triggeringThreshold end)
return r
end,