c# - Windows UWP 中对 Xbox One 的 Controller 支持

标签 c# xbox uwp xinput xbox-one

我想知道我应该如何处理针对 Xbox One 的 UWP 应用程序的输入。我注意到了 DirectInput,但在我的用例中发现了两个问题:

  1. 来自 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.

  2. 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/

相关文章:

c# - 是什么导致 "The type or namespace name ' UI' does not exist in the namespace"错误?

c# - UWP应用程序不断抛出未经授权的访问异常

c# - Xamarin:过期让我们加密证书和 HttpClient

windows-10 - Xbox 上的 UWP 应用

c# - 检测当前设备 (UWP) 是否支持共享 UI

xbox360 - Xbox 360 应用程序开发快速入门

c# - 如何从 ServiceLocator 迁移到依赖注入(inject)?具体例子

c# - 如何关闭或重置 Owin Self Host

c# - 如何在 C# 中匹配模式并提取其中的一部分?

c# - 生成 wcf 代理与 ChannelFactory