Archived

This topic is now archived and is closed to further replies.

Lufian

handling multiple gamepads with DirectInput

Recommended Posts

Lufian    122
Hello, I am using DirectInput within an OpenGL program. Everything went fine until I tried to give support to multiple gamepads. The SDK of DirectX (along with the 2.43trillions other site I visited) explains how to set one up, but doesn''t help when a second gamepad comes in. May anyone help / point me to / show me something, on that matter. I did experiment on my own, but that did not went right. Thank you

Share this post


Link to post
Share on other sites
Mastaba    761
Using multiple devices is really no different than using a single device. You just enumerate the devices and create the ones you want to use. Exactly the same way if you wanted to use keyboard, mouse, and gamepad. Adding an additional gamepad device is trivial.

Share this post


Link to post
Share on other sites
Lufian    122
I''m sure it is easy, but being new with DirectInput doesn''t make it as easy as it supposed to be. I did try enumerating a second device, but it seems that they both find the same gamepad.

Share this post


Link to post
Share on other sites
Lufian    122
Thanks for the link, but this code has a completly different way of creating inputs (well basing myself on a prior MSDN tutorial. I did try to see what I could add, but for an MSDN article, this code is very messy and I could not make it work.

Share this post


Link to post
Share on other sites