Here is the code for my game.
Here is the code that you wanted!!!!
The error is going to be showed by a =
Dim rc As Integer
Static NotFirstTime As Integer
If Not NotFirstTime Then
NotFirstTime = False
= rc = joyGetDevCaps(IDDevice, JoyCaps, Len(JoyCaps))
If rc <> 0 Then
GetJoyStickPos = rc
Exit Function
End If
JoyCaps.Xmax = uint_to_long(JoyCaps.XmaxIn)
JoyCaps.Xmin = uint_to_long(JoyCaps.XminIn)
JoyCaps.Ymax = uint_to_long(JoyCaps.YmaxIn)
JoyCaps.Ymin = uint_to_long(JoyCaps.YminIn)
JoyCaps.Zmax = uint_to_long(JoyCaps.ZmaxIn)
JoyCaps.Zmin = uint_to_long(JoyCaps.ZminIn)
End If
rc = joyGetPos(IDDevice, JoyInfo)
GetJoyStickPos = rc
If rc <> 0 Then Exit Function
JoyInfo.X = uint_to_long(JoyInfo.Xin)
JoyInfo.Y = uint_to_long(JoyInfo.Yin)
JoyInfo.Z = uint_to_long(JoyInfo.Zin)
JoyInfo.ButtonDown(1) = (JoyInfo.ButtonStates And JOY_BUTTON1) = JOY_BUTTON1
JoyInfo.ButtonDown(2) = (JoyInfo.ButtonStates And JOY_BUTTON2) = JOY_BUTTON2
JoyInfo.ButtonDown(3) = (JoyInfo.ButtonStates And JOY_BUTTON3) = JOY_BUTTON3
JoyInfo.ButtonDown(4) = (JoyInfo.ButtonStates And JOY_BUTTON4) = JOY_BUTTON4
End Function