sdl2_window icon indicating copy to clipboard operation
sdl2_window copied to clipboard

Xbox One gamepad: dpad doesn't send events

Open gyscos opened this issue 10 years ago • 2 comments

I have a Xbox One gamepad plugged with a USB cable. Using a simple test app in C, I see that everything works fine and is detected by SDL2, including the d-pad. However, when using the sdl2_window backend for piston and printing all input events, I receive events for every part of the gamepad, except the dpad, it's as if it wasn't present at all.

Does the dpad require specific handling? The test app refers to it as a hat, does this mean something? Thanks!

gyscos avatar Nov 03 '15 04:11 gyscos

Joystick support is new, implemented by me, and I didn't know hats were a thing (I just have a SNES controller!) So fairly certain this just needs to be implemented. Unfortunately, I don't have that controller to test. If you're interested in digging in:

Good luck!

xaviershay avatar Nov 03 '15 05:11 xaviershay

Handy example program to test with

and a protip I wish I knew about when I started this stuff: you can setup your .cargo/config file to use local checkouts of all the above projects)

xaviershay avatar Nov 03 '15 05:11 xaviershay