C#, SlimDX and NES USB Controller

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
C#, SlimDX and NES USB Controller
by on (#162086)
I'm trying to access my NES Controller (connected to my PC with an USB-adapter). It works fine with FCEUX, but when trying to code something in C#, I can't access the d-pad.
I'm a totally newbie with DirectInput and such so that may explain it.. But I can detect keypresses but not just the d-pad for some reason.
Hints anyone perhaps?
Re: C#, SlimDX and NES USB Controller
by on (#162089)
Have you tried reading the "axes" or the "hat switch"?
Re: C#, SlimDX and NES USB Controller
by on (#162117)
I've checked the .compability property (I think that was the name, don't have the source in front of me right now), but it only reports the joypad has 4 buttons, nothing about directional buttons.
The .GetState() function never reports any X/Y activity.