Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Screen 12
- Dim x As Single
- Dim y As Single
- Dim buttons As Integer
- Dim result As Integer
- Dim a As Integer
- Const JoystickID = 0
- 'This line checks to see if the joystick is ok.
- If GetJoystick(JoystickID,buttons,x,y) Then
- Print "Joystick doesn't exist or joystick error."
- Print
- Print "Press any key to continue."
- Sleep
- End
- End If
- Do
- result = GetJoystick(JoystickID,buttons,x,y)
- Locate 1,1
- Print ;"result:";result;" x:" ;x;" y:";y;" Buttons:";buttons,"","",""
- 'This tests to see which buttons from 1 to 27 are pressed.
- For a = 0 To 26
- If (buttons And (1 Shl a)) Then
- Print "Button ";a;" pressed. "
- Else
- Print "Button ";a;" not pressed."
- End If
- Next a
- Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement