Cannot configure d-pad for DualShock 4 on macOS (DEF-3708) (SOLVED)

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.

1 Like

Hmm, @sven might know more?

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. :frowning:

3 Likes

Thanks for the answer. Do note that there are two separate issues, though:

  1. The d-pad not working
  2. The DS4 controller having the same name as my Xbox 360 controller (“Wireless Controller”), which makes it impossible to have them in the same mapping.
3 Likes

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.

1 Like

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…

1 Like

Thanks a lot! Really appreciated! :smiley: 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)

1 Like

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. :slight_smile: PR has passed review, hopefully available next stable release.

4 Likes

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)

2 Likes

I feel your pain, I have also been looking into solutions for this. I don’t have anything ready to disclose, but rest assured I also really want this. :wink:

Would also love to play a Defold game with a frying pan. :+1:

2 Likes

Offtopic: On both Joycons (connected to macOS), all buttons work fine except for the thumbsticks.

2 Likes

Gamepad hats (DEF-3708) is supported on macOS and Windows as of 1.2.157.

5 Likes

Cool! Thanks! Can’t wait to give it a try tomorrow!

1 Like

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 :slight_smile:

2 Likes

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.

I already found something with my DS4 at home: DualShock 4 via Bluetooth on macOS misbehaves

1 Like