; JoyType Example ; --------------- Graphics 640,480,0,2 SetBuffer BackBuffer() While Not KeyDown(1) Cls ; JoyType reports what is plugged in: 0=none, 1=digital, 2=analog. ; The example polls it every frame. jt=JoyType() Select jt Case 0 desc$="no joystick detected - plug in a gamepad!" Case 1 desc$="digital joystick attached" Case 2 desc$="analog joystick attached" End Select Text 0,0,"Try plugging a joystick in or out Esc: exit" Text 0,20,"JoyType() = "+jt+" ("+desc$+")" If jt>0 Then ; With a stick attached, prove it works with live axis readouts Text 0,60,"Stick x-axis JoyX(): "+JoyX() Text 0,80,"Stick y-axis JoyY(): "+JoyY() End If Flip Wend End