Search code examples
winapi

GameInput calls on Win32


Microsoft's GameInput documentation states:

GameInput is available on all Windows platforms—PC, Xbox, HoloLens, IoT, and others—and is callable from GDK, Win32, and Universal Windows Platform (UWP) applications.

GameInput is a functional superset of all legacy input APIs—XInput, DirectInput, Raw Input, Human Interface Device (HID), and WinRT APIs—in addition to adding new features of its own.

GameInput is the recommended API for all new code, regardless of the target platform

This strongly implies that Win32 applications can call DirectInput functions, that other controller APIs are legacy and that all new code should be using GameInput.

However, libraries required to link a GameInput.h seem to be available only through GDK. Please correct me if I wrong on this one. GDK is a specific product with a specific licence, which states:

Licensee is in the business of, among other things, developing and/or publishing Microsoft Windows Titles. Licensee shall be permitted to use the GDK solely to develop and test such Microsoft Windows Titles for the Microsoft Windows Platform.

This is not true in my case, as I am building a non-game desktop application which uses Win32, which may be middleware for other software etc. Therefore using GDK seems prohibited. I just want to access controllers in a modern way.

Second, GameInput on Windows seems to have lots of bugs and incomplete APIs from what I've seen around.

So, the questions are:

  • Can GameInput be used as a separate library from GDK?
  • Has anyone used GameInput from Win32 and what is its current state?

Solution

  • According to the Doc: Input API reference

    Microsoft GameInput is an API, and that is part of the Microsoft Game Development Kit (GDK).

    As far as I'm concerned, you couldn't use GameInput without GDK.

    If you want to use GameInput on windiws without GDK, you could try to use XInput. XInput Game Controller APIs is designed for use by developers who want to use the Xbox Controller for their Windows applications.