As I recall, the dpad/pov is accessed through the TJoystick struct via the joy1_TopHat and joy2_TopHat which contain an int between -1 and 7 where:
-1 not pressed
0 up
1 up/right
2 right
3 down/right
4 down
5 down/left
6 left
7 left/up
For example, to see if the dpad/pov is not pressed you could do something like:
Or if you wanted to see if the dpad/pov on the second joystick was pressed to the right, you could do something like:
You could define an enum to better describe the values for the dpad/pov and it also looks like a good candidate for a switch statement depending on what you want to do with it.
More complex example showing an emum and switch function: