Seems my problem wasnt cleared up completely by the code change, only I am now more confused than before. I have two joysticks, which I am not plugging in at the same time. Both joysticks, when run with jtest respond correctly and fully. However with my code above, only one joystick responds correctly.
The first one a standard USB gravis gamepad, works fine in my code and jtest.
The second one, an adapter hub for ps2 controllers, works fully with jtest.
However under my code, its detected, and only one component axis change is detected, only right after the program starts.
I add a few lines to dump a list of all the detected controllers, and I tried plugging the ps2 controller into player 2's slot to see
if I had the wrong controller. Again jtest works fine with it attached to player 1's port on the adapter hub.
Linux plugin claims to have found 2 controllers
Available Controller List
Twin USB Joystick
Twin USB Joystick
Active Joystick set to: Twin USB Joystick
x:-1.0
y:-1.0
z:-1.0
rz:-1.0
The axis change that is detected doesnt seem to be related to the controller, because I get the same output with not controller plugged into the hub after starting the program. I am confused as to why jtest would find the output and not this code,