I'm adding gamepad support to my app and I'd like to make sure I'm not misusing either of those for determining whether a key has been pressed. What is the purpose of either GamepadButtonFlags
and GamepadKeyCode
? Are there any guidelines for which should be used in certain cases, or are they completely interchangeable?
Asked
Active
Viewed 242 times
0

user1306322
- 8,561
- 18
- 61
- 122
-
I don't believe GamepadButtonFlags and GamepadKeyCode are actually part of xinput. (They are not found in xinput.h) I'm assuming that they are part of an interface or class you are using other than xinput itself. I'd suggest you adjust your question and tags to include info about where you are finding these variables and what language you are working in. – Chip Burwell Jan 07 '16 at 19:10
-
The mouseover tooltip says they're both from `SharpDX.XInput`. Added tag. I don't think language is important here but it's c#. – user1306322 Jan 07 '16 at 22:22
1 Answers
0
Turns out (at least for the version I was using), GamepadButtonFlags
has much fewer key flags than anyone who wants full controller support would want. GamepadKeyCode
has all the keycodes, but I couldn't find a way to make them work, and googling gave me only 9 search results, including this (my own) post.
So I just swapped SharpDX for SlimDX and all the same methods worked flawlessly with GamepadKeyCode.

user1306322
- 8,561
- 18
- 61
- 122