GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CALIBRATE_JOYSTICK (3)

NAME

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

CONTENTS

Synopsis
Description
See Also

SYNOPSIS

#include <allegro.h>

int calibrate_joystick(int n);

DESCRIPTION

Most joysticks need to be calibrated before they can provide full analogue input. This function performs the next operation in the calibration series for the specified stick, assuming that the joystick has been positioned in the manner described by a previous call to calibrate_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 performed successfully.

SEE ALSO

install_joystick(3), calibrate_joystick_name(3), joy(3), num_joysticks(3), exjoy(3)
Search for    or go to Top of page |  Section 3 |  Main Index


Allegro CALIBRATE_JOYSTICK (3) version 4.4.2

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.