|
-
Jan 20th, 2007, 10:13 AM
#1
Thread Starter
New Member
Reading joystick / 360 game pad
Hello all,
I'm using VB5. I have written a program (AutoJoy) that allows an analog joystick to be used in Far Cry. I'm trying to write a version for the 360 game pad. Problem is, I don't have one (I use a flight yoke with three analog axes).
I use this to read the three analog axes (the first parameter specifies joystick 0):
joyGetPos 0, JoyInformation
v_axis1 = JoyInformation.wYpos: v_axis2 = JoyInformation.wXpos: v_axis3 = JoyInformation.wZpos
This works fine, but I'm not sure about the other axes. I'm assuming the additional axes on the 360 game pad appear on joystick 1, so I use:
joyGetPos 1, JoyInformation
v_axis4 = JoyInformation.wYpos: v_axis5 = JoyInformation.wXpos: v_axis6 = JoyInformation.wZpos
Unfortunately this does not work. It returns exactly the same data as for joystick 0. As there is no physical joystick 1 I would expect random or zero data.
Does anyone know what I'm doing wrong? It occurred that, because there is no actual joystick 1, maybe the system simply returns the data for joystick 0. Is it possible that if I did in fact have a 360 joy pad installed, this would work correctly?
My other question concerns the POV. Are the four POV switches treated as standard buttons, perhaps with specific button numbers? Or does Windows treat them differently? If so, how would I do it in VB5?
Many thanks,
Best regards,
Chris
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|