microsoft / DirectXTK

The DirectX Tool Kit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++
https://walbourn.github.io/directxtk/
MIT License
2.57k stars 510 forks source link

Port C++/WRL Gamepad to C++/WinRT #179

Closed DJm00n closed 5 years ago

DJm00n commented 5 years ago

DirectXTK Gamepad class is used as a reference implementation of using Windows::Gaming::Input and Windows::Xbox::Input APIs by many game programmers (by me 🤣).

Please port Windows 10 and Xbox ONE implementations from now deprecated C++/WRL to new and shiny C++/WinRT that is officially supported now.

walbourn commented 5 years ago

Actually, I use WRL which means that the library doesn't actually build with C++/CX /ZW. It should be compatible with both C++/CX and C++/WinRT as a result.

I recently cleaned up some integration functions in for Keyboard/Mouse to improve the C++/WinRT experience, but it doesn't impact implementation.

What issues in particular are you noticing?

DJm00n commented 5 years ago

Oh, sorry, you're indeed using WRL. So I mean porting code from C++/WRL to C++/WinRT. According to current docs WRL is superseded by C++/WinRT. I just lacking official usage examples of Windows::Gaming::Input for C++/WinRT. Will rename issue.

walbourn commented 5 years ago

In that case, see this sample.