View Single Post
  #2  
Old 05-18-2010, 11:33 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The following code shows how to detect all the attached joysticks:
Code:
import vizjoy
joysticks = []
while True:
	joy = vizjoy.add()
	if joy.valid():
		joysticks.append(joy)
	else:
		break
print len(joysticks),'joysticks detected'
Reply With Quote