Friendship Club

Friendship Club

Ragnar2013 Oct 25, 2016 @ 10:06pm
Disable xinput
Is it possible to disable xinput in order to play with 8 xbox 360 controllers?
< >
Showing 1-4 of 4 comments
Force Of Habit  [developer] Oct 26, 2016 @ 2:53pm 
Last time I checked the first four controllers use xinput and the last four do not! As an aside, also want to make sure you have seen this: Trying to work out a solution.
supersmo Nov 19, 2016 @ 2:42am 
What's the status on this case?
I doubt the first four will use XInput and the rest of the XBox360 devices will use DirectInput.
4 of the devices would be enumerated on the XInput side and all 8 would be enumerated on the DirectInput side. In order to mix XInput and DirectInput with 8 XBox360 controllers without disabling XInput, the correct devices on the DirectInput side would have to be filtered out. I have to date not seen a working example of this as it has been proven to be very difficult to do.

So normally games supporting more than 4 controllers have an option to disable XInput for all devices.
The way I think it's done in SDL2 by default is:
4 Xinput devices are detected and any number of nonXinput devices are detected on the DirectInput side which seems to be the case here.

IF you use SDL2 you can disable XInput like this:(C++ example)
Before calling SDL_init add this line of code:

If you're using InControl (Unity3d plugin) there is the possibility of using the Native Input Module and disabling XInput for those devices.

One option is to use xbcd drivers so your XBox360 controllers only use DirectInput. However, then you won't be able to play games requiring XInput without changing back to the original drivers or using X360ce.
Haven't tested but should work.

If the game uses SDL it might be possible to compile a version of SDL with disabled XInput and then drop the dll in the game folder.

If SDL is being used and I were to be gifted a copy I'd be happy to look into it. :-)
Last edited by supersmo; Nov 19, 2016 @ 10:55am
supersmo Nov 19, 2016 @ 10:37am 
I bought the game to try out the SDL2 thing.
It turns out that it doesn't use SDL2.dll

I plugged in 8 wired Microsoft XBox360 controllers and it worked.

I'm assuming that it automatically uses DirectInput for all controllers if more than 4 XInput devices are connected when the game starts.

(The game crashed though when I went to check out the controller config area with 8 gamepads connected.)

Did you try the game or were you just asking before you buy?
If you've tried the game what happened?

Either way you got me to buy the game out of troubleshooting curiousity ;-)
Last edited by supersmo; Nov 19, 2016 @ 2:14pm
Force Of Habit  [developer] Dec 2, 2016 @ 8:09am 
I think this is a solution for now: if you look in data/ark2d/gamepads.json you will see the controller mappings. There is a value in there for xinput and it's set to true for Xbox controllers. Set this to false and they should go back to using DirectInput. (Not 100% certain though!)
< >
Showing 1-4 of 4 comments
Per page: 15 30 50