calibrate_joystick man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

calibrate_joystick(3)		Allegro manual		 calibrate_joystick(3)

NAME
       calibrate_joystick  -  Calibrates  the specified joystick. Allegro game
       programming library.

SYNOPSIS
       #include <allegro.h>

       int calibrate_joystick(int n);

DESCRIPTION
       Most joysticks need to be calibrated before they can provide full  ana‐
       logue  input. This function performs the next operation in the calibra‐
       tion series for the specified stick, assuming  that  the	 joystick  has
       been  positioned	 in  the  manner described by a previous call to cali‐
       brate_joystick_name(), returning zero on success. For example, a simple
       routine to fully calibrate all the joysticks might look like:

	  int i;

	  for (i=0; i<;num_joysticks; i++) {
	     while (joy[i].flags & JOYFLAG_CALIBRATE) {
		char *msg = calibrate_joystick_name(i);
		textprintf_ex(..., "%s, and press a key\n", msg);
		readkey();
		if (calibrate_joystick(i) != 0) {
		   textprintf_ex(..., "oops!\n");
		   readkey();
		   exit(1);
		}
	     }
	  }

RETURN VALUE
       Returns	zero on success, non-zero if the calibration could not be per‐
       formed successfully.

SEE ALSO
       install_joystick(3),   calibrate_joystick_name(3),   joy(3),   num_joy‐
       sticks(3), exjoy(3)

Allegro				 version 4.4.2		 calibrate_joystick(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net