1


I'm planning to do a simple game using the XNA and I would like to add the possibility of using a Play Station 2 controller. Is there a way to detect its inputs?

BlackBear
  • 22,411
  • 10
  • 48
  • 86
  • I wonder how you will connect it to the pc? – Tomas Voracek May 22 '11 at 18:08
  • @Tomas Voracek: there are some adapters, like this one: http://www.dealextreme.com/p/dual-ps-ps2-controller-to-usb-2-0-pc-joystick-adapter-11707 – BlackBear May 22 '11 at 18:11
  • The PS2 controller was designed in Japan. Other side of the planet, try reversing the wires. Kidding aside, the odds of an electrical match are zilch unless you can find or design an adapter. – Hans Passant May 22 '11 at 21:25
  • @Hans Passant: here it is: http://www.dealextreme.com/p/dual-ps-ps2-controller-to-usb-2-0-pc-joystick-adapter-11707 – BlackBear May 23 '11 at 16:08

1 Answers1

4

There is no API in XNA / .NET Framework which gives you simple access to generic gamepads. There is a .NET wrapper around DirectInput which you could use for that purpose.

Marcel Jackwerth
  • 53,948
  • 9
  • 74
  • 88