Jump to content
  • Advertisement
Sign in to follow this  
Reegan

General DirectInput Questions (Joystick)

This topic is 3697 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 all, thanks for coming :) Question 1: Do i have to create multiple joystick devices for the amount of joysticks that can be used in my game? im fairly new to the joystick thing so, would i have to do this:
IDirectInputDevice8 *m_lpJoystick;

//or this:

IDirectInputDevice8 *m_lpJoystick[4];
Question 2: Also, i would like to have support for Plug 'n' Play, PS3 and Xbox 360 handsets (at the same time) how would i go about this? Is it really difficult to add support for PS3 and Xbox handsets? Thanks for reading :)

Share this post


Link to post
Share on other sites
Advertisement
its very easy to use an xbox 360 game pad and direct input. you just need to use XInput and that has full support for 360 pad.

hope this helps theres loads of examples to get going with xinput.

not sure about ps3 pad though

edit
oh yeah and for the devices, when using 360 pad I have

XINPUT_STATE gamepad[4];

and then each frame you can use a function something like getPadState(gamepad) in a loop to get the states of them if they are connected.

Share this post


Link to post
Share on other sites
Ok so i take it i have to create an array of devices for the number joysticks aloud in my game :) thanks, ill wat for a second oppinion though, i also still need to find out about ps3 handset support ;D

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!