DesktopGL project in Windows 10 unable to detect more than 4 XBox controllers

I am currently designing a cross-platform demo designed to work with eight controllers. I’m running into an issue where more than four Xbox controllers of any combination belonging to the 360 or Xbox one do not show up in the connected state list. Both the GamePad.GetState and JoyStickState.GetState methods exhibit the issue. How do I get the other controllers to respond in MonoGame? For the XBox 360 controllers, I’m using an Xbox 360 wireless dongle which supports up to 4. For the Xbox One controllers, I’m using an Xbox One wireless dongle that also supports up to 4. My main operating system is Windows 10, unsure if the same issue occurs on Mac or Linux. All eight controllers connected simultaneously display and respond correctly when testing using joy.cpl.

Why with Unity can I use between eight to sixteen controllers and can’t in Monogame?

(In contrast, the eight controller setup works as intended when targeting the MonoGame Windows 10 universal project which builds the game as a Windows Store app. However, I would like to stick with the cross platform desktop project so migration to Mac or Linux is smooth.)

Don’t know for sure, but just reading your message implies that Mac and Linux does not support 8 controllers

I would test that first.

If windows UWP supports it, then that implies windows supports it.

SO if the cross platform solution is to stay cross platform, it has to support ONLY what can be supported on all target platforms.

Have you tried DesktopDX perhaps?

DesktopDX only supports 4 controllers max, just like XNA.

Oh well, that explains that game on the home page being on the XBOX ONE then.

The difference in limits stems from the fact that there are 3 main ways to access inputs from windows, the newer Windows.Gaming.Input assembly (https://docs.microsoft.com/en-us/uwp/api/windows.gaming.input), the older XInput, and the even older DirectInput. DirectInput didn’t have a hard limit like with XInput’s 4. I haven’t seen a hard limit for Windows.Gaming.Input either, but MonoGame defines the UWP as 16.

The other thing is there is an implementation for SDL (http://wiki.libsdl.org/) which can support up to 16 devices as well and has implementations across Windows, Mac OS X, Linux, iOS, and Android.
It’s located in: MonoGame.Framework/Platform/Input/GamePad.SDL.cs

I found the limits MonoGame uses in: MonoGame.Framework/Platform/Input.

2 Likes

The project has been tested with the latest version of MonoGame (v3.8.1.303) and this issue has finally been resolved! Six to eight XBox Controller all connected at once on a Windows machine using OpenGL.

Kudos!

1 Like