Hi Jim,

Just for your info accessing both sticks on a gamepad is actually
quite simple with DirectInput. The joystates are lX and lY for the
left stick and rX and RY for the right stick. My memory of the correct
VB code is a bit fuzzy but it should look something like this.

' declare variables to get the x/y axis of both sticks
Dim x1 As Long
Dim x2 As Long
Dim y1 As Long
Dim y2 As Long

' Get the state of the left stick
x1 = joystate.lX
y1 = joystate.lY

' Get the state of the right stick
x2 = joystate.rX
y2 = joystate.rY

I hope that helps. Its been ages since I messed around with VB 6, but
that's basically how it works. Same basic code as the left stick but
instead of the lX and lY states you use the rX and RY states of the
joystate object you initialized in your joystick initialization.

Cheers!


On 8/13/14, Jim Kitchen <j...@kitchensinc.net> wrote:
> Hi Charles,
>
> Besides all of the things that Thomas said, the biggest problem that I have
> is that the code that I found only finds the left stick.  I just could not
> figure out how to get it to find two sticks.  So it finds ten buttons and
> one stick.  Now with the Logitech MOMO Racing steering wheel the steering
> wheel is the left and right of the stick and the gas and brake peddle is the
> up and down of the stick.  A person can use one stick with the game, but it
> just isn't very intuitive or fun to steer with the one stick left and right
> and at the same time with the same stick do the gas and brake peddle.
>
> BTW My Saitek ST290 Pro joystick has a large triangular shaped base.  Then
> there is one joystick about a foot tall.  It has a wrist rest on it, a
> trigger and four thumb buttons on the top of it.  And then on the base there
> is also a horseshoe shaped slider control which would work great for the
> throttle in say Puppy 1, but I could not figure out how to detect that
> control either.
>
> BFN
>
>      Jim
>
> What Do You Call a Boomerang That Doesn't work? A Stick
>
> j...@kitchensinc.net
> http://www.kitchensinc.net
> (440) 286-6920
> Chardon Ohio USA
> ---
> Gamers mailing list __ Gamers@audyssey.org
> If you want to leave the list, send E-mail to
> gamers-unsubscr...@audyssey.org.
> You can make changes or update your subscription via the web, at
> http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
> All messages are archived and can be searched and read at
> http://www.mail-archive.com/gamers@audyssey.org.
> If you have any questions or concerns regarding the management of the list,
> please send E-mail to gamers-ow...@audyssey.org.
>

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to