Have been looking and searching and i cannot find how to access Joystick D-Pad in Dinput8. We have the DIJOYSTATE2 structure where it gets its info, but don't know what to choose. I know that rgb_butoons[] array holds the buttons info, and that lX and lY the analog stick.
Still don't know the D-Pad (cross)
I believe
rgdwPOVis what you're after. I'm assuming you've created your device,SetDataFormat(&c_dfDIJoystick2)and Acquired it.I shift the state of the DPADs into a 16-bit int so that each bit represents 1 of the directions in each of the DPADs, 4-bits for each DPAD (up,down,left,right).
Here's an example in C++: