Xinput Vs Dinput

  

Directinput to xinput

“Xbox 360 Controller Emulator” allows your controller (gamepad, joystick, steering wheel, pedals, etc.) to function as an Xbox 360 controller. It allows you to remap buttons and axes and to drive cars with Steering Wheel and Pedals or to fly planes with Joystick and Throttle in games like “Grand Theft Auto”, “Mafia” or “Saints Row”. This common complaint arose with the introduction of Xbox when Microsoft changed controller APIs from DirectInput to XInput for Windows 7. Unfortunately, even though these two APIs existed side. Use X-Arcade™ as a Windows Joystick/Gamepad Controller - Xinput/Dinput While the X-Arcade controllers work as a keyboard with the default PC connection, there are ways to make it act like a gamepad instead for games that don't offer great keyboard-based controller support. Its microsofts fault for not offering drivers for the commonly used way to handle Input on Windows (DInput), not Unitys. Thats what I wanted to say (also I don't see how XInput in Unity is related to a potential X360 Unity, as the later will require dev license and dev sdk which has its own way handling this kind of things and is independent.

02-17-2019, 02:56 PM
Dinput vs xinput emulatorsXinput vs directinput cemuDifference between xinput and directinput
If you have ever wanted to have a DInput controller and a XInput controller work with the same game controller profile at the same time try this:
Example. Normally a button mapping for two controllers looks something like this.
For Button A
`Button 1` | `Button A`
The button 1 is from my DInput Power A Gamecube controller, the Button A is from the XInput Xbox 360 controller.
To make them both appear and register with Dolphin regardless of which one is the active device or on at the time. I now use this:
For Button A
`DInput/0/Wireless Gamepad:Button 1` | `XInput/0/Gamepad:Button A`
------------------------------
Short how To:
In your controller setup window. Map the buttons for the first controller so for example the Xbox360 controller. It should have XInput/0/Gamepad in the Device section of the controller setup. Once done mapping your buttons, right click on each button you just mapped, to open the configure input menu. In here, put: XInput/0/Gamepad: or XInput/1/Gamepad: or whatever the Device name happens to be before the controller button you mapped in.
Now, turn on the other controller or plug in the other controller, in my example I have a Power A Wireless Gamecube controller. This shows up for me as a DInput/0/Wireless/Gamepad. When I map the buttons for this one I use the |OR. Then put DInput/0/Wireless/Gamepad: in front of the buttons I just mapped for the DInput controller and vwalla both controllers work and it doesn't matter which Device is the active device.
This might seem silly to some, but for me this is a solution that has made a huge difference in my enjoyment of my system. Running a front end, it makes a big difference.
In my setup, the xbox controller is the main controller that the front end is setup with, the only time I have an issue is when I want to use gamecube controllers for gamecube. By doing it this way, when I navigate to dolphin and start the game with the 360 controller, I can then pick up my gamecube controller and just start playing the game. Before hand I had to open the menus and fiddle with it with a keyboard and mouse to switch the profile to my Power A controller.
Just sharing with the community, this was a huge breakthrough for me, hope this helps someone else out if they are in the same boat. If this has already been covered somewhere else, my apologies for the duplication.

Xinput Vs Directinput Cemu

Hey guys out there, thanks for the valuable feedback so far! Some people also told us, they would like to see support not only for the Xbox controller but also for the general gamepad. So here are some facts about DirectInput and XInput from a developer’s point of view.
Microsoft introduced Xinput, forcing developers to use Xinput to get support for all Xbox controller features. The advantages are, that it has an easy setup and is simple to use. Nowadays some other game controllers (e.g. models from Logitech) support the Xinput interface as well, and others – which only support the direct input interface – can be simulated as XInput devices through an additional Emulation software like MotioninJoy or x360ce.
Direct Input on the other hand, can detect nearly any device (if there are drivers of course) and its capabilities. However, the API documentation is still not very informative. And it can be difficult to implement, due to the various supported devices with different axes and button layouts and therefore different data formats.
So at the moment, we are evaluating the situation (with the small number of different controllers that are available to us) and are implementing a technical sample. The PlayStation3 Controller for instance, could be supported per Direct Input, although I needed to install the MotioninJoy Driver before Input Data could be updated. I also tried to emulate it as XInput Device, where the capabilities could be read from the controller, but when trying to get some state data from it the “device was not connected.” Weird stuff! But at least it should work with Direct Input. 😉
We will see next time, which controllers we end up supporting and if it will be XInput only (like it is now), or a hybrid DirectInput – Xinput approach.