How do I block XInput / DirectInput in games?
In some games, the ability to remap the controller is non-existent and the default mapping is mismatched with my controller. I want to know how to prevent those games (commonly running DirectX) from detecting that I have a controller connected while I use Xpadder to do the remapping myself?
Best Answer
On some controllers, they will have a switch that switches between XInput and DirectInput. If the games are using DirectX, usually they will be using XInput, as stated here,
Note Use of legacy DirectInput is not recommended, and DirectInput is not available for Windows Store apps.
The site also is more favoring towards using XInput, at least for DirectX games. If you flip that switch to DirectX, and XPadder supports mapping DirectX controls, you'll be good to go.
Pictures about "How do I block XInput / DirectInput in games?"



What is XInput and DirectInput in gamepad?
XInput is an API that allows applications to receive input from the Xbox Controller for Windows. This document describes the differences between XInput and DirectInput implementations of the Xbox Controller and how you can support XInput devices and legacy DirectInput devices at the same time.Which is better XInput or DirectInput?
XInput is newer, so it's easier to use and is generally found in a wider range of modern gamepads. In comparison, DirectInput is a much older API, so old that it's considered a legacy API by Microsoft. Because of its age, DirectInput still manages to hold some advantages over Xinput.What is the difference between XInput and DirectInput?
A game developer that makes an Xbox game can more easily translate the game to Windows with Xbox controller support. Also, Xbox controllers only vibrate with XInput, and the API handles the trigger buttons as two separate inputs instead of a single positive/negative axis on DirectInput.Is Steam controller XInput or DirectInput?
The Steam controller uses XInput to send commands to your computer. When you're using multiple controllers, some games may try to prioritize some over others depending on their input style, DirectInput or XInput. Please note: Windows restricts XInput devices to a four device maximum.How to Play DirectInput Games with Steam Input
More answers regarding how do I block XInput / DirectInput in games?
Answer 2
It sounds like DirectInput can be blocked using HidGuardian (https://github.com/ViGEm/HidGuardian)
It will apparently soon be replaced by HidHide which will also support blocking XInput.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Tatiana Syrikova, Matthias Groeneveld, Tatiana Syrikova, Jim De Ramos
