Code archives/User Input/Joystick port detection

This code has been declared by its author to be Public Domain code.

Download source code

Joystick port detection by starfox2002
This code was originally by semer
max_port = 2
while not keyhit(1)
for test_port = 0 to max_port
if joydown(1,test_port) then
print "joystick detected on port " + str$(test_port)
exit
endif
next
wend
end

Comments

None.

Code Archives Forum