1
\$\begingroup\$

I'm making a multiplayer game in GameMaker Studio 2. The game supports upto 12 controllers, where the first four are XInput controllers. The rest would be DirectInput.

If I try playing with 8 Xbox controllers, only 4 of them are detected in the game, as expected.

But, is there a way to get more than 4 Xbox controllers working?

\$\endgroup\$
1
  • \$\begingroup\$ I found some project on gitlab (open_xinput) that allows to use XInput but with more than 4 controllers, maybe you can take a look and see if it works? \$\endgroup\$ Mar 13, 2020 at 22:41

1 Answer 1

2
\$\begingroup\$

Xinput library only supports 4 controllers at a time - please refer to the wiki page on Directinput -DirectInput Wiki. May take some work, but you could enumerate some of the controllers under Direct Input initially, then eliminate those being detected by XInput. That would require interrogating the GUIDs on the controllers. I believe you can obtain them in XInput.

\$\endgroup\$
3
  • \$\begingroup\$ "you could enumerate some of the controllers under Direct Input initially" How would you do that? If I'm using GameMaker Studio, I suppose I'll need to write an external DLL with C++ or something? \$\endgroup\$ Jul 15, 2019 at 5:40
  • 1
    \$\begingroup\$ Most likely yes. Which is certainly going to have to roll something of your own. I would test the more than 8 controllers myself. Only have 7. The question will be whether directinput recognizes more than 8. I haven't seen anything to suggest it doesn't \$\endgroup\$
    – ErnieDingo
    Jul 18, 2019 at 21:25
  • \$\begingroup\$ Keep in mind that XInput and DirectInput have slightly different specs: XInput will only support XBox 360 type controllers, while DirectInput will support pretty much any controller, old and new. However, there are some features in the XBox 360 controllers that only work with XInput, such as the vibrators, and separate L/R triggers -- in DirectInput, they are both mapped to a single axis. Also, XInput has much better performance, and is much easier to use than DirectInput. \$\endgroup\$ Mar 14, 2020 at 16:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .