I tried creating an input map for my DS4 controller (plugged in via USB) on macOS, but the gdc utility doesn’t respond at all when I press anything on the d-pad.
EDIT: Furthermore, the device’s name is identified as “Wireless Controller”, which is the same as my Xbox 360 controller, so I cannot have them both into one gamepad mapping.
Sorry for the late reply, but I took a quick look at this today.
It seems that the d-pad registers as a hat input, an input type which we currently (a surprise to me) do not read! I’ve added a issue for this: DEF-3708
Not sure when we can investigate this further, but it feels like something you really need if you want to have gamepad support.
Hi! Any update on this? I tried today with an XBox One controller via Bluetooth and the D-PAD and LT/RT are not recognised by gdc. This effectively makes gamepads not usable on macOS.
I have started on a branch for gamepad hats support, which I guess at least the D-pad registers itself as. It’s working on OSX, need to finish implementation for Windows and Linux. Will try to up prio on it since it’s close to being finished…
Thanks a lot! Really appreciated! I’m currently using the Xbox 360 controller for dev, with the unofficial macOS driver, but that causes occasional kernel panics. Being able to use a DS4 or Xbox One controller would be great! (Also that’s what most people buying the game on Steam will own)
Btw, maybe I can make you a bit happier in regards to the gamepad support with a feature me and @jhonny.goransson have been hacking on for a while; connect/disconnect gamepad events at runtime. In short; you no longer need to have the gamepad(s) connected when the game starts. PR has passed review, hopefully available next stable release.
That is amazing. I’ve actually been wanting to talk about gamepads with you guys more in-depth. There are a few things that are missing. One is connecting/disconnecting at runtime. Another one is handling input maps for gamepads not configured at build time. (Say, if somebody wants to play our game with a Guitar Hero controller or a frying pan with an Teensy duct-taped to it, there should be a way to allow the player to map their own controls)
Please let us know if there are issues or if you find gamepads that misbehave, we had to struggle a little bit to find devices that report hat input on the platforms we support
Tomorrow I’ll have access to a DS4, Xbox 360, Xbox One X, Joycons and two crappy aftermarket controllers (out of which one I know for sure it reports a HAT). I’ll test them out both wired and wireless on macOS and Windows and let you know if there are any issues.