Mercurial > sdl-ios-xcode
comparison src/haptic/SDL_syshaptic.h @ 2512:ef147ee4896c gsoc2008_force_feedback
Improved some ioctl handling.
Implemented SDL_MouseIsHaptic and SDL_HapticOpenFromMouse.
More code comments.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Thu, 10 Jul 2008 08:38:08 +0000 |
parents | 66c02abeef0e |
children | 030fc4375e63 |
comparison
equal
deleted
inserted
replaced
2511:f12ae0bae468 | 2512:ef147ee4896c |
---|---|
21 */ | 21 */ |
22 | 22 |
23 #include "SDL_config.h" | 23 #include "SDL_config.h" |
24 | 24 |
25 #include "SDL_haptic.h" | 25 #include "SDL_haptic.h" |
26 | |
27 | |
28 /* | |
29 * Number of haptic devices on the system. | |
30 */ | |
31 extern Uint8 SDL_numhaptics; | |
26 | 32 |
27 | 33 |
28 struct haptic_effect | 34 struct haptic_effect |
29 { | 35 { |
30 SDL_HapticEffect effect; /* The current event */ | 36 SDL_HapticEffect effect; /* The current event */ |
66 * Returns 0 on success, -1 on error. | 72 * Returns 0 on success, -1 on error. |
67 */ | 73 */ |
68 extern int SDL_SYS_HapticOpen(SDL_Haptic * haptic); | 74 extern int SDL_SYS_HapticOpen(SDL_Haptic * haptic); |
69 | 75 |
70 /* | 76 /* |
77 * Returns the index of the haptic core pointer or -1 if none is found. | |
78 */ | |
79 int SDL_SYS_HapticMouse(void); | |
80 | |
81 /* | |
71 * Checks to see if the joystick has haptic capabilities. | 82 * Checks to see if the joystick has haptic capabilities. |
72 * | 83 * |
73 * Returns >0 if haptic capabilities are detected, 0 if haptic | 84 * Returns >0 if haptic capabilities are detected, 0 if haptic |
74 * capabilities aren't detected and -1 on error. | 85 * capabilities aren't detected and -1 on error. |
75 */ | 86 */ |
81 * | 92 * |
82 * Returns 0 on success, -1 on error. | 93 * Returns 0 on success, -1 on error. |
83 */ | 94 */ |
84 extern int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, | 95 extern int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, |
85 SDL_Joystick * joystick); | 96 SDL_Joystick * joystick); |
86 | |
87 /* | 97 /* |
88 * Checks to see if haptic device and joystick device are the same. | 98 * Checks to see if haptic device and joystick device are the same. |
89 * | 99 * |
90 * Returns 1 if they are the same, 0 if they aren't. | 100 * Returns 1 if they are the same, 0 if they aren't. |
91 */ | 101 */ |