patch from Steven Mueller for using more than 4 joystick devices in linux (d1x r1...
[btb/d2x.git] / arch / linux / include / joystick.h
1 /* $Id: joystick.h,v 1.3 2004-05-22 01:32:13 btb Exp $ */
2
3 #define MAX_AXES 32
4
5 typedef struct joystick_device {
6         int             device_number;
7         int             version;
8         int             buffer;
9         char            num_buttons;
10         char            num_axes;
11 } joystick_device;
12
13 typedef struct joystick_axis {
14         int             value;
15         int             min_val;
16         int             center_val;
17         int             max_val;
18         int             joydev;
19 } joystick_axis;
20
21 typedef struct joystick_button {
22         ubyte           state;
23         ubyte           last_state;
24 //changed 6/24/1999 to finally squish the timedown bug - Owen Evans 
25         fix             timedown;
26 //end changed - OE
27         ubyte           downcount;
28         int             num;
29         int             joydev;
30 } joystick_button;
31
32 extern int j_num_axes;
33 extern int j_num_buttons;
34
35 extern joystick_device j_joystick[MAX_JOY_DEVS];
36 extern joystick_axis j_axis[MAX_AXES];
37 extern joystick_button j_button[MAX_BUTTONS];
38
39 extern int j_Update_state ();
40 extern int j_Get_joydev_axis_number (int all_axis_number);
41 extern int j_Get_joydev_button_number (int all_button_number);
42
43 extern void joy_set_min (int axis_number, int value);
44 extern void joy_set_center (int axis_number, int value);
45 extern void joy_set_max (int axis_number, int value);