Jump to content
  • Advertisement

Archived

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

camcbri

using gamepad as mouse

This topic is 5662 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

hi guys! an idea just struck me that I wish a mouse had a lot more buttons... then i thought, why not use a gamepad (ie MS Sidewinder) to get my input in windows... Its not very cool to move a cursor with a d-pad, but hey, i want to learn some DirectInput! I thought I might create a background app that recognizes the 10 buttons on the gamepad and then reinterprets them as, say L mouse button/R mouse button/copy/paste/etc, and also use the dpad to move the cursor. Is this feasible? Has someone already done this so I could play with it? If anyone has any advice or resources for something simple like this, please let me know.. I''m a directx nooB, so I appreciate any assistance! - Chris

Share this post


Link to post
Share on other sites
Advertisement
I suppose you could track the cursor position manually and use SetCursorPos using your coords. The Only thing is that it would probably still read from the mouse as well. Not sure about handling mouse clicks but that should get you started -

If (LeftPressed) x--;
If (RightPressed) x++;
If (UpPressed) y--;
If (DownPressed) y++;

SetCursorPos(x,y);

Neil


WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

Share this post


Link to post
Share on other sites

  • 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!