So, how does it work?
Above just one cut down code example of several attempts to get some response from the joystick. Nothing. What's the trick, please, anyone?
Use <code>code goes here...</code> tags for posting code :
What did you expect that code to do? It doesn't create a display or do anything with the 'col' variable, so there's no visible output from the program.
What do you want to do with the joystick?
Monitor joystick events and respond accordingly.
So I am retrieving the axis data from the joystick correctly?
What's there is only the code pertaining to that end. Displays and such are suppressed. Let's assume that 'col' is a heading modifier variable, for example, like then;
heading += col;
Both col and heading would be float type, BTW.
So I am retrieving the axis data from the joystick correctly?
It looks like it. Is your 'heading' changing when you move the joystick?
Show your full code, and tell us what you expect to happen, and what is or isn't happening.
Look at the ex_josystick_events example (included in the manual entry for al_get_joystick_event_source()).
Thanks guys, it is working as expected now. Rough, functioning mock up here. I am still not sure what I was doing wrong to start with.
All the best.