Hello, have been porting a game to Defold from another engine, mostly to see the differences, but have been on Windows until today. I’m pretty sure my inputs worked fine on Windows, maybe even on Steam Deck building from Windows (not real sure about that one.)
However I switched to a Linux desktop today. Do not have access to Windows at the moment to verify. But for some reason my gamepad’s right trigger is inverted. Like holding down the button is sending a ‘released’ signal and 0 value. Not pressing it is sending 1 value constantly.
My left trigger seems to be working fine.
function on_input(self, action_id, action)
if action_id == hashes.INPUT_PRIMARY_ABILITY then
print(action_id)
pprint(action)
end
end
Outputs
DEBUG:SCRIPT: hash: [primary]
DEBUG:SCRIPT:
{ --[[0x797fea980ea0]]
gamepad = 2,
value = 1,
userid = 0,
gamepad_unknown = false,
released = false,
pressed = false,
repeated = false
}
DEBUG:SCRIPT: hash: [primary]
DEBUG:SCRIPT:
{ --[[0x797fea996770]]
gamepad = 2,
value = 0,
userid = 0,
gamepad_unknown = false,
released = true,
pressed = false,
repeated = false
}
Where the top block is spammed while NOT pressed. The bottom is printed as soon as I press the right trigger and the spamming stops.
I’m using an 8bitdo that is registered as an xbox 360 controller. Also tried with a PS4 controller, same thing. And built it to my Steam Deck and saw the same thing. My version is up to date. I also tried on other game engines, web browser testing, and just in steam games and the trigger functioned fine everywhere else.
I could put up a bug if needed but figured I’d see if anyone else has seen this? Or if maybe it is just me? Sanity check?
Also, it seems to detect my keyboard and mouse as unidentified gamepads and makes my gamepad #2… also kind of weird but maybe expected since Linux can be weird?