Xbox One Controller Support for PC (SOLVED)

Hey I know defold only supports Xbox 360 controllers for the PC officially but has anyone tried it with the Xbox One controller? I can’t imagine windows has changed the way the OS registers the two controllers that differently but figured I would check.

Thanks!

1 Like

Find someone on social media with one connected to their PC and ask them to test a demo?

Create a copy of the default.gamepads found in the builtins folder and then define your new copy in the game.project. Try to create new mappings (edit the file directly in a text editor) for the name of the xbox one controller and see if it works if it just doesn’t by default. I’m not sure if it will work but would be interesting to see. I don’t have any other controller than 360 usb handy to test myself.

If adding more controller information to that file is all it takes to add more devices, then we (someone with time to do it) should find a good sample file with many good configs of various gamepads. I’ve seen them on github before with the license to use their data.

1 Like

Sven is usually very quick to add controller support to his games and other projects.

@sven, do you have any experience with the Xbox One controller? If we haven’t tried an XBox One controller I’ll grab one from the gaming room and give it a try.

1 Like

Me and Sven tested this and the Xbox One controller identifies itself and maps its buttons in the same way as the Xbox 360 controller that we already have mappings for. This means that you shouldn’t have to do anything on Windows to support Xbox One controllers.

On OSX it’s a bit different since you need to install a driver. And we don’t have any mapping for the “Xbox One Wired Controller” in the default gamepads. I have added the binding and it will show up in the release after the current one.

Worth mentioning is that we have a small command line tool that can be used to create these mappings. We should probably share the tool with the community. Right @sven?

4 Likes

Agree regarding the tool! Would also need to figure out a good/easy way to distribute it, it rarely changes so maybe just put it somewhere for now… Will check with the team.

3 Likes

I added a gamepad tester app to my public examples:

Connect a gamepad and test the buttons, pads and sticks to see if they are properly mapped.

8 Likes

Awesome thank you guys so much for your responses!

1 Like