And yes, the dreaded joystick Joyroll question

Blitz3D Forums/Blitz3D Programming/And yes, the dreaded joystick Joyroll question

I wrote this little thing while trying to track down my own joystick's odd axii.. axisses.. axi.. whatever. Perhaps it'll help.

Graphics 800,300,0,2

While Not KeyHit(1)
	Cls

	Text (0, 0, "ID")
	Text (50, 0, "X")
	Text (100, 0, "Y")
	Text (150, 0, "Z")
	Text (200, 0, "U")
	Text (250, 0, "V")
	Text (300, 0, "Yaw")
	Text (350, 0, "Pit")
	Text (400, 0, "Rol")
	Text (450, 0, "Hat")
	Text (500, 0, "Buttons")

	For n=0 To 16
		If (JoyType(n) > 0)
			Text (0, 15+n*15, n)
			Text (50, 15+n*15, Int(JoyX(n)*1000))
			Text (100, 15+n*15, Int(JoyY(n)*1000))
			Text (150, 15+n*15, Int(JoyZ(n)*1000))
			Text (200, 15+n*15, Int(JoyU(n)*1000))
			Text (250, 15+n*15, Int(JoyV(n)*1000))
			Text (300, 15+n*15, Int(JoyYaw(n)*1000/180))
			Text (350, 15+n*15, Int(JoyPitch(n)*1000/180))
			Text (400, 15+n*15, Int(JoyRoll(n)*1000/180))
			Text (450, 15+n*15, Int(JoyHat(n)))
			btns$ = ""
			For b = 0 To 20
				If (JoyDown(b,n)) btns = btns + b + " "
			Next
			Text (500, 15+n*15, btns)
		End If
	Next

	Flip
Wend