dinput and xinput: what are they and what do they do?

Continuing the discussion from Agnostic game controller for large hands?:

So, that controller Clover bought, when turned on, has four modes it can start in, depending on the key pressed.

switch - Y + ⏻
dinput - B + ⏻
xinput - X + ⏻
android - A + ⏻

I recognized dinput and xinput only slightly, been a long time since I’d messed with inputs at that level. Anyhow, I can’t tell if certain games just don’t work, or if that controller is wonky. It would help to know what that are, and how they differ. @trashHeap your sentence just confused me more! :slight_smile: What about a game decides which input?

dinput is the ancient protocol for talking to gamepads and joysticks, which descends from the earliest windows days and makes few assumptions about gamepad layout. Games using dinput usually have to have their keys mapped on a per game bases.

xinput is the newer API developed by Microsoft originally for the XBox family of controllers which has swept the industry and has become something of a standard, though their are sub revisions. Its API is built around a lot of asumptions ( twin analogs, triggers, four buttons a dpad, etc. )

Ancient games written for dinput either dont recognize xinput based controllers OR their inputs maps bizarely often in unplayable ways. ( Soul Reaver 1 on Windows famously has you running in circles clockwise, if you try to run it with a 360 controller without the aid of some level of software gamepad emulation between your controller and the game.)

In linux you can emulated the xinput API with any controller with the userland xboxdrv utility I believe though that can be cumbersome.

Often, age.

1 Like

Would dinput usage be something useful to database?

Would be useful on a games page, I think. I’d find it so.

1 Like