Why should I back my title’s input code with GameInput?
GameInput is an updatable input platform. By using it, Windows can better abstract the variety of input devices available on the market and continue improving support for those devices over time through platform updates. By using GameInput, your title will be automatically updated to function with new devices through Windows and hardware releases. Further, GameInput provides access to newer features not previously available on Windows, such as impulse triggers, and better support for features like haptics and sensors. By using GameInput, your title can take advantage of these features with minimal code changes.What platforms does GameInput support?
GameInput is available on:- XBOX (V.1+ beginning with the 2510 GDK)
- Windows 10 (version 19H1/May 2019 update and later)
- Windows 11
Do I need different versions for XBOX and PC?
No, the same GameInput API works across all platforms. Beginning with the 2510 GDK, the latest GameInput API is available on both XBOX and PC, with the same headers and binaries provided in the Microsoft.GameInput NuGet package. The GameInput installer is only required for PC, as the runtime is included with the GDK on XBOX.Does GameInput work with commonly used engines like Unreal Engine?
Yes, although the level of integration varies by engine. Some engines ship first-party GameInput support as an engine plug-in, while others rely on a sample or a native plug-in that you integrate yourself.- Unreal Engine: GameInput support ships with the engine as a set of plug-ins, beginning with Unreal Engine 5.4. Game Input Base provides the core functionality and interface, Game Input (Windows) implements it for Win64 and WinGDK, and XBOX Common Game Input implements it for XBOX One and XBOX Series X|S. Enable these plug-ins in your project to route input through GameInput on both PC and console. For more information, see Microsoft GDK plug-ins for Unreal Engine.
- Godot: The XBOX Godot Sample includes a GDExtension that binds GameInput to Godot, including bridging GameInput to Godot’s
InputandInputMapsystems. This is a reference integration that you build and adapt for your project rather than a built-in engine feature. For more information, see Getting started with Godot. - Unity: No Microsoft GDK package currently exposes GameInput to Unity on PC, so Unity games on PC typically read input through the Unity Input System. On XBOX Series X|S and XBOX One, the GXDK Input System package for Unity adds console-specific functionality to the Unity Input System. For more information, see GDK packages for Unity.
My application can’t find GameInput - what should I check?
- Verify the GameInput runtime is installed on the target machine. For versions v.1 and later, this requires a Microsoft.GameInput package, which the user can install from the MSI package in the Microsoft.GameInput NuGet package. To install the latest version of the package you can also run
winget install Microsoft.GameInputfrom an elevated command prompt. - Ensure your application links against the correct GameInput library. The latest version in the NuGet package guarantees your project uses the right GameInput binary across the different endpoints/platforms.
- Check that your Windows version supports GameInput (19H1 or later).
How difficult is it to port from XInput to GameInput?
Many XInput functions map one-to-one to GameInput equivalents, simplifying the work to port from one to the other. The main difference is that GameInput uses C++ interfaces instead of flat C functions. GameInput also provides extra functionality not available in XInput, like access to the impulse trigger found in XBOX One controllers and other similar devices.How do I port from DirectInput or Raw Input?
GameInput provides an interface path as part of the GameInputDeviceInfo structure. This field is the same one used by the DirectInput API, allowing applications to continue using their existing DirectInput code for device enumeration and information retrieval while migrating input reading and other functionality to GameInput. For more details, see the GameInput porting guide.What does the GameInput service do?
The GameInput service is responsible for arbitrating access to input devices on the system, and for providing useful compatibility and abstraction layers for other applications. Among other things, the GameInput service:- Handles input filtering and synchronization
- Delivers platform updates and device driver improvements
- Mediates access to input devices between GameInput client instances
Can I call GameInput from my render thread?
Yes, almost all GameInput functions are safe for time-sensitive contexts like render threads. The main exception isGameInputCreate, which you should call during application initialization.
