Will a dualshock ps4 gamepad work on MG windows project?

What title says. I need to decide which to buy.
Thanks.

If youre using OpenGL, this is the specific commit of the gamecontrollersdb that MonoGame 3.8.1.303 uses.

If your controller is in there then yes.

Otherwise you can create the mapping yourself and load it. More info here Nintendo NES joycon does not recognize select - #12 by Aristurtle

2 Likes

Im not using open gl im using mg for windows, ie direct x…

Thanks

You know, i completely missed the part in the title where you specified Windows project, so thats my bad.

I have a DS4 at home that i can check later to answer you when i get off work unless someone else answers before me.

It might require setting up JoyToKey or the DS4 application, but im not sure exactly at the moment.

1 Like

No, MonoGame Windows (DX target) will not recognize PS4 controllers on its own. You would need to use MonoGame GL, which uses SDL for input and recognizes PS4 controllers and pretty much any other modern controller as well.

If you are set on a DX build, your users will need to use something like DS4Windows to play your game with a PS4 controller. If you publish your game on Steam, Steam Input will handle this for you (spoofing the PS4 controller as an Xbox controller that DX will recognize).

1 Like

Thanks all. And another question, if i have an older xbox controller that dont work on opengl but works on dx project, why is that? Shouldnt opengl support both xinput and direct input? So why would’nt an old xbox gamepad work with gl?

If it’s some random off-brand controller, it will almost certainly work and is just missing an entry in SDL’s controller DB for its UUID. You can add one pretty easily as Aristurtle mentioned.

1 Like