Mercurial > sdl-ios-xcode
comparison src/joystick/linux/SDL_sysjoystick_c.h @ 2713:0906692aa6a4
Final merge of Google Summer of Code 2008 work...
Force Feedback for SDL
by Edgar Simo, mentored by Ryan C. Gordon
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 25 Aug 2008 09:55:03 +0000 |
parents | |
children | 99210400e8b9 |
comparison
equal
deleted
inserted
replaced
2712:c4e697245676 | 2713:0906692aa6a4 |
---|---|
1 /* | |
2 SDL - Simple DirectMedia Layer | |
3 Copyright (C) 1997-2006 Sam Lantinga | |
4 | |
5 This library is free software; you can redistribute it and/or | |
6 modify it under the terms of the GNU Lesser General Public | |
7 License as published by the Free Software Foundation; either | |
8 version 2.1 of the License, or (at your option) any later version. | |
9 | |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 Lesser General Public License for more details. | |
14 | |
15 You should have received a copy of the GNU Lesser General Public | |
16 License along with this library; if not, write to the Free Software | |
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
18 | |
19 Sam Lantinga | |
20 slouken@libsdl.org | |
21 */ | |
22 | |
23 #if SDL_INPUT_LINUXEV | |
24 #include <linux/input.h> | |
25 #endif | |
26 | |
27 /* The private structure used to keep track of a joystick */ | |
28 struct joystick_hwdata | |
29 { | |
30 int fd; | |
31 char *fname; /* Used in haptic subsystem */ | |
32 | |
33 /* The current linux joystick driver maps hats to two axes */ | |
34 struct hwdata_hat | |
35 { | |
36 int axis[2]; | |
37 } *hats; | |
38 /* The current linux joystick driver maps balls to two axes */ | |
39 struct hwdata_ball | |
40 { | |
41 int axis[2]; | |
42 } *balls; | |
43 | |
44 /* Support for the Linux 2.4 unified input interface */ | |
45 #if SDL_INPUT_LINUXEV | |
46 SDL_bool is_hid; | |
47 Uint8 key_map[KEY_MAX - BTN_MISC]; | |
48 Uint8 abs_map[ABS_MAX]; | |
49 struct axis_correct | |
50 { | |
51 int used; | |
52 int coef[3]; | |
53 } abs_correct[ABS_MAX]; | |
54 #endif | |
55 }; |