Mercurial > sdl-ios-xcode
comparison src/joystick/linux/SDL_sysjoystick_c.h @ 2489:96adc8025331 gsoc2008_force_feedback
Exposed some of the joystick stuff to the haptic subsystem.
Added SDL_JoystickIsHaptic().
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Wed, 02 Jul 2008 08:24:35 +0000 |
parents | |
children | be9b206d44af |
comparison
equal
deleted
inserted
replaced
2488:8e2bdbccf7ff | 2489:96adc8025331 |
---|---|
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 /* The current linux joystick driver maps hats to two axes */ | |
32 struct hwdata_hat | |
33 { | |
34 int axis[2]; | |
35 } *hats; | |
36 /* The current linux joystick driver maps balls to two axes */ | |
37 struct hwdata_ball | |
38 { | |
39 int axis[2]; | |
40 } *balls; | |
41 | |
42 /* Support for the Linux 2.4 unified input interface */ | |
43 #if SDL_INPUT_LINUXEV | |
44 SDL_bool is_hid; | |
45 Uint8 key_map[KEY_MAX - BTN_MISC]; | |
46 Uint8 abs_map[ABS_MAX]; | |
47 struct axis_correct | |
48 { | |
49 int used; | |
50 int coef[3]; | |
51 } abs_correct[ABS_MAX]; | |
52 #endif | |
53 }; |