Maybe there’s something that could be done about this, but it may be complicated.įix #3: Or, to throw out a (possibly?) crazy idea, we go the other way around, and always primarily use DirectInput for all devices, and do the correlation the other way around - detect which XInput devices are correlated to DInput devices - and only ever use the data from the XInput APIs for overriding the trigger axis values (once correlated) and triggering rumble. The simple “disable XInput if more than 4 controllers” solution would not have this problem (except, perhaps when adding a 5th controller at run-time). When a player has 5 or more XInput devices plugged in and unplugs one, one of the extra DirectInput controllers will now be upgraded to XInput, and, I believe, there is no way for us to know which one, so we would need to do the correlation logic again whenever an XInput device is removed, and it will likely cause controllers to swap players.
These games usually use SDL directly, but apparently newer games (Super Bomberman R, for instance) are using SteamInput which is using SDL in XInput-mode, and not allowing more than 4 players by default (unless you use non-XInput-compatible controllers).įix #1: There’s a relatively simple, fool-proof solution - if, when iterating DirectInput controllers, more than 4 are found, disable XInput as if SDL_XINPUT_ENABLED=0 was set.įix #2: I’d rather get the best of both worlds though - XInput for the first 4 controllers, DirectInput for the rest. But, I’ve got a lot of games in my Steam library that don’t do that, and have to be coerced into supporting more than 4 XInput-capable devices by disabling XInput via DLL patches or environment variables. Obviously, any game can just disable XInput and, for the most part, things will just be better (especially on low-end systems where, at low framerates, the evented DirectInput will miss fewer button presses than the polling XInput) - unless they want to use both triggers at once or rumble. that are higher than the Xbox 360 controller.After seeing threads about people disabling Steam’s self-updating and replacing Steam’s SDL2.dll with versions with that have XInput disabled, in order to fix games that get artificially capped at 4 controllers, I think it’s time to fix SDL to support more than 4 XInput-capable controllers by default. However, it does not support buttons, sticks, etc. Therefore, it is possible to operate with the optimum operation method (assumed by the creator) without making any special key settings. The layout and vibration functions of the buttons and sticks are all unified in the form of the XBOX 360 controller. The format is based on the Xbox 360 controller. A format newly created and recommended by Microsoft as an alternative to DirectInput.DirectInput has been provided as a component for input control of Microsoft DirectX, but it has not been updated since DirectX 8 (around 2000).
Depending on the controller and game implementation, there may be cases where the allocation is not successful. In addition, since the number and position of buttons and sticks are not fixed, it is necessary to set the key assignment according to the controller used by the user in order to operate with the optimum operation method. Therefore, it is necessary for the program side to support various types such as the number of buttons, the number of sticks, and the presence or absence of the vibration function of the controller. It supports various types of controllers, from game pads to complex control stick controllers used in steering wheel controllers and flight sims. A format that has been used on PCs for a long time.