I have a USB adapter that allows me to connect two playstation controllers to my PC.
It works fine with most commercial games but I can't get DBP to read both controllers.
I can read the first one no problem using this code to test it:
set display mode 800,600,16
perform checklist for control devices
repeat
cls
print "Default control device: ",control device name$()
for l =1 to checklist quantity()
print "Available control device ",str$(l),": ",checklist string$(l)
next l
print ""
print "Joystick up: ";joystick up()
print "Joystick down: ";joystick down()
print "Joystick left: ";joystick left()
print "Joystick right: ";joystick right()
Print ""
print "Joystick up: ";joystick up()
print "Joystick down: ";joystick down()
print "Joystick left: ";joystick left()
print "Joystick right: ";joystick right()
Print ""
Print "Joystick x: ";joystick x()
Print "Joystick y: ";joystick y()
Print "Joystick z: ";joystick z()
print ""
print "joystick fire a: ";joystick fire a()
print "joystick fire b: ";joystick fire b()
print "joystick fire c: ";joystick fire c()
print "joystick fire d: ";joystick fire d()
print ""
print "joystick twist x: ";joystick twist x()
print "joystick twist y: ";joystick twist y()
print "joystick twist z: ";joystick twist z()
Print ""
for l=1 to 12
print "joystick fire";l;": ";joystick fire x(l)
next l
sync
until false
That reads the first controller with no problems. So i thought adding these two lines:
a$=checklist string$(2)
set control device a$
Just below the checklist loop would allow me to read the second controller - It doesn't.
Changeing the lines to this:
a$=checklist string$(1)
set control device a$
I can no longer read from Joypad 1.
I'm confused - Does anyone understand whats happening and how can I read both Joypads?
Thanks