Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
353 views
in Technique[技术] by (71.8m points)

c# - Controller support for Xbox one in Windows UWP

I am wondering how I am supposed to handle input for UWP apps targeting Xbox One. I have noticed DirectInput, but I see two issues with it for my use cases:

  1. From MSDN, it only seems to support Xbox 360 controllers

    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 and all of its API's (Direct2d, Direct3D, Xinput, etc...) are only supported on C / C++. That means even if Xinput supported Xbox one controllers, I could not use C# or JavaScript to develop truly universal apps.

What options do I have (at least as far as C# is concerned) for supporting Xbox One controller support on a Windows UWP app?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Take a look at the Windows.Gaming.Input namespace. Its GamePad class is in the Universal API contract and available on all device families and languages.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...