Jump to content
  • Advertisement
Sign in to follow this  
paulbird

Gamepad support

This topic is 4422 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I have just bought a nice new Logitech Gamepad for my PC which so far I have tried on Sega Sonic Adventure DX. Does anyone know how where to find some information about getting input from a gamepad device in a C++ Win32 type game? I am using OpenGL at the moment not DirectX mainly because it seems a lot easier to use. I want to support gamepads in my future games and game engine since I think this will make them more fun to play and give them an extra edge.

Share this post


Link to post
Share on other sites
Advertisement
Even though you're using OpenGL to render your program's graphics, you can still use DirectInput to read joystick/mice/keyboard input.

DirectInput can be used without any other part of DirectX.

Of course, DirectInput has been depreciated by microsoft, in favor of RawInput, but I know nothing about it yet.



Share this post


Link to post
Share on other sites
Search MSDN for the joyGetPosEx function. There are of course other ways of doing this (such as through DirectX I think), but this is pretty simple with this function I think...

Share this post


Link to post
Share on other sites
Thanks, I've just seen the "joySetCapture" functions from Win32 which seem to be just the job (if they work). I missed them before because I was searching for "gamepad" instead of "joystick".

Now I just need to find out how to implement the extra buttons that my gamepad has the Win32 doesn't seem to support...



[Edited by - paulbird on June 10, 2006 6:15:15 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!