Hi!
I’m currently struggling with trying to get the Xbox Series X/S controller to work with Defold. I know it’s working as I’ve tried playing games with it like Dome Keeper.
The game that is not working for me is Void Scrappers by @Alex_8BitSkull for example.
What I’ve currently tried is:
- Ran the
gdc-linux
tool to detect the gamepad and input, it just keeps telling me no gamepad is connected in a loop:
INFO:GRAPHICS: Initialised graphics device 'opengl'
No connected gamepads, rechecking in 3 seconds. 2.. 1.. Rechecking...
No connected gamepads, rechecking in 3 seconds. 2.. 1.. Rechecking...
- Defold seems to detect the controller as this message is shown in the console:
No gamepad map found for gamepad 0 (Microsoft Xbox Series S|X Controller). The raw gamepad map will be used.
But no matter what I do, nothing gets reported in the on_input
function. I’ve stripped it down to:
function on_input(self, action_id, action)
pprint(action_id)
pprint(action)
end
To see which raw input events are received, but other than my keyboard and mouse, nothing shows up. According to the docs I should get an action_id
with hash("raw")
if I’m not mistaken, although the forum mentions the usage of hash("gamepad_raw")
so I’ve tried this one too just to be sure.
I’m currently on Linux and working in Defold 1.6.0.
Please help me in the right direction, it’s driving me insane . What am I missing and/or doing wrong?
Edit: I’ve also just found this GitHub issue; https://github.com/defold/defold/issues/8059 – Might be also affecting the Series S/X Xbox controller(s) than?
I can confirm that the gdc-linux
tool from version 1.4.7 detects the controller and is able to create a mapping.