我想知道我应该如何处理针对 Xbox One 的 UWP 应用程序的输入。我注意到了 DirectInput,但在我的用例中发现了两个问题:
来自 MSDN , 它似乎只支持 Xbox 360 Controller
XInput is an API that allows applications to receive input from the Xbox 360 Controller for Windows. Controller rumble effects and voice input and output are supported.
DirectX 及其所有 API(Direct2d、Direct3D、Xinput 等)仅在 C/C++ 上受支持。这意味着即使 Xinput 支持 Xbox one Controller ,我也无法使用 C# 或 JavaScript 开发真正通用的应用程序。
我有哪些选项(至少就 C# 而言)支持 Windows UWP 应用上的 Xbox One Controller 支持?
最佳答案
看看 Windows.Gaming.Input命名空间。它的GamePad类在通用 API 契约(Contract)中,适用于所有设备系列和语言。
关于c# - Windows UWP 中对 Xbox One 的 Controller 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31977767/