install_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]

install_joystick(3)		Allegro manual		   install_joystick(3)

NAME
       install_joystick	 -  Initialises the joystick. Allegro game programming
       library.

SYNOPSIS
       #include <allegro.h>

       int install_joystick(int type);

DESCRIPTION
       Installs Allegro's joystick handler, and calibrates the centre position
       values.	The  type  parameter should usually be JOY_TYPE_AUTODETECT, or
       see the platform specific documentation for a  list  of	the  available
       drivers.	  You  must  call this routine before using any other joystick
       functions, and you should make sure that all joysticks are in the  mid‐
       dle position at the time. Example:

	  textout_centre_ex(screen, font,
			    "Center the joystick and press a key",
			    SCREEN_W/2, SCREEN_H/2, red_color, -1);
	  readkey();
	  if (install_joystick(JOY_TYPE_AUTODETECT) != 0)
	     abort_on_error("Error initialising joystick!");

RETURN VALUE
       Returns	zero  on  success.  As soon as you have installed the joystick
       module, you will be able to read the button state and  digital  (on/off
       toggle)	direction  information, which may be enough for some games. If
       you want to get full analogue input, though, you need to use the	 cali‐
       brate_joystick()	 functions  to	measure the exact range of the inputs:
       see below.

SEE ALSO
       remove_joystick(3),  num_joysticks(3),	load_joystick_data(3),	 cali‐
       brate_joystick(3),     calibrate_joystick_name(3),    poll_joystick(3),
       exjoy(3)

Allegro				 version 4.4.2		   install_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