Log in

View Full Version : Logitech Gamepad: Dpad programming?


katiebelle
21-02-2011, 18:27
Does anyone know what axis the dpad is called on the logitech controller?

Dave Scheck
21-02-2011, 18:37
You may want to check out the class that's posted here (http://www.chiefdelphi.com/forums/showthread.php?t=73234).

To directly answer your question though, it's a combination of axes 5 (x) and 6 (y).if (x < -0.5 && y < -0.5)
return kUpLeft;
if (x < -0.5 && y > 0.5)
return kDownLeft;
if (x > 0.5 && y > 0.5)
return kDownRight;
if (x > 0.5 && y < -0.5)
return kUpRight;
if (y < -0.5)
return kUp;
if (x < -0.5)
return kLeft;
if (y > 0.5)
return kDown;
if (x > 0.5)
return kRight;

return kCenter;

katiebelle
21-02-2011, 19:40
Thanks for the help.