Polls the joystick.


int poll_joystick();
The joystick handler is not interrupt driven, so you need to call this function every now and again to update the global position values. Example:
   do {
      /* Get joystick input */

/* Process input for the first joystick */ if (joy[0].button[0].b) first_button_pressed();

if (joy[0].button[1].b) second_button_pressed(); ... } while(!done);
Returns zero on success or a negative number on failure (usually because no joystick driver was installed).
Examples using this:

Related Discussions

The following threads each have code containing this keyword: Note: You can click on the numbers to jump directly to the posts that reference this page.

Related Projects

The following projects include source code containing this keyword: