GameInput sideloading

Starting with GameInput 4.0, you can deploy the GameInput runtime, GameInputRedist.dll, in the same directory as your game's executable. This is called sideloading. A sideloaded runtime lets your game use the GameInput features and fixes that it was built and tested with, even on a system where the GameInput redistributable isn't installed or an older version is installed. This model is similar to the one used by the DirectX Agility SDK.

Sideloading is supported on PC and on XBOX consoles. On XBOX, sideloading requires the October 2025 GDK (2510) or later, and it lets your game use a newer API version than the GDK runtime supports, such as API v4 before the October 2026 GDK. For more information, see GameInput on XBOX consoles.

Important

Installing the GameInput redistributable is still the preferred way to deploy GameInput on PC. An installed runtime supports all GameInput features, is shared by all applications, and is updated independently of your game. Use sideloading when installing the redistributable isn't practical, for example, when your distribution channel doesn't support running installers, or on development and test machines.

Getting the sideloadable runtime

The Microsoft.GameInput NuGet package contains the sideloadable runtime in the following locations.

Path in the package Contents
native\bin\x64\ GameInputRedist.dll and GameInputRawInputProxy.exe for 64-bit PC games
native\bin\x86\ GameInputRedist.dll and GameInputRawInputProxy.exe for 32-bit PC games
native\bin\arm64\ GameInputRedist.dll and GameInputRawInputProxy.exe for Arm64 PC games
native\bin\xbox\ GameInputRedist.dll for XBOX consoles

The NuGet package doesn't copy these files to your build output. Add a step to your build or packaging process that copies the files for your target platform and architecture next to your game's executable.

On PC, also deploy GameInputRawInputProxy.exe in the same directory as GameInputRedist.dll. The sideloaded runtime uses this helper process to receive keyboard and mouse input. A sideloaded runtime only uses the proxy that's next to it, never the one from an installed redistributable. If the proxy is missing, the runtime falls back to receiving keyboard and mouse input in your game's process.

Warning

The PC and XBOX runtimes have the same file name. Make sure that you deploy the copy that matches your target platform. If the wrong copy is deployed, GameInputCreate fails with HRESULT_FROM_WIN32(ERROR_EXE_MACHINE_TYPE_MISMATCH) (0x800700D8).

How the runtime is selected

You don't need to change your code to use a sideloaded runtime. Link with gameinput.lib from the NuGet package and call GameInputCreate as usual. The first time GameInputCreate is called, the loader in gameinput.lib looks for the GameInput runtime in the following locations:

  1. The inbox runtime, GameInput.dll, in the system directory.
  2. The installed redistributable runtime, GameInputRedist.dll, in the system directory or in the directory where the GameInput redistributable is installed.
  3. The sideloaded runtime, GameInputRedist.dll, in the directory of the game's executable.

The loader uses the runtime with the highest file version. If two runtimes have the same version, the sideloaded runtime is preferred over the installed redistributable, and the installed redistributable is preferred over the inbox runtime.

On PC, when a sideloaded runtime is loaded and a newer GameInput runtime is installed on the system, the sideloaded runtime forwards all calls to the newer installed runtime. As a result, the sideloaded runtime acts as a minimum version: your game always uses either the version that you shipped or a newer installed version. The game is still treated as sideloaded, and the limitations in the following section continue to apply.

Limitations

On PC, some GameInput features depend on components that are only present when the GameInput redistributable is installed, such as the GameInput service that manages input focus. When your game uses a sideloaded runtime on PC, the following limitations apply. These limitations don't apply on XBOX consoles.

  • Calls to IGameInput::EnableBackgroundInput with true have no effect, because enabling background input also claims the system buttons, which a sideloaded runtime can't claim.
  • Input focus isn't managed by the GameInput service, so GameInput doesn't consistently filter input based on whether your game is in focus. Depending on the device, your game might or might not receive input while it isn't in focus. If your game depends on consistent focus behavior, check whether it's in focus before acting on input, or install the GameInput redistributable.
  • In API versions v1 through v3, IGameInput::SetFocusPolicy accepts only GameInputDefaultFocusPolicy and GameInputEnableBackgroundInput. Other focus policies, including any combination of flags, are ignored.
  • In API versions v1 through v3, IGameInput::RegisterSystemButtonCallback fails with GAMEINPUT_E_FEATURE_REQUIRES_INSTALL (0x838AD02B). In API version v4, system buttons are reported in readings of kind GameInputKindSystemButton, which work with a sideloaded runtime. For more information, see IGameInputReading::GetSystemButtonState.

Recommendations

  • Use the same version of the NuGet package for the GameInput header, gameinput.lib, and the sideloaded runtime.
  • Test your game both with and without the GameInput redistributable installed.
  • If your game requires background input or consistent focus behavior on PC, install the GameInput redistributable instead of, or in addition to, sideloading the runtime. For more information, see GameInput for PC and console with NuGet.

See also

GameInput for PC and console with NuGet
GameInput on XBOX consoles
GameInput API versioning
GameInput fundamentals
GameInput API reference