Mercurial > sdl-ios-xcode
comparison src/haptic/linux/SDL_syshaptic.c @ 2478:4fd783e0f34b gsoc2008_force_feedback
Added query functions for haptic devices.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Mon, 30 Jun 2008 17:28:34 +0000 |
parents | 97f75ea43a93 |
children | b9eb2cfe16cd |
comparison
equal
deleted
inserted
replaced
2477:97f75ea43a93 | 2478:4fd783e0f34b |
---|---|
205 if (haptic->hwdata == NULL) { | 205 if (haptic->hwdata == NULL) { |
206 SDL_OutOfMemory(); | 206 SDL_OutOfMemory(); |
207 goto open_err; | 207 goto open_err; |
208 } | 208 } |
209 SDL_memset(haptic->hwdata, 0, sizeof(*haptic->hwdata)); | 209 SDL_memset(haptic->hwdata, 0, sizeof(*haptic->hwdata)); |
210 /* Set the hwdata */ | 210 /* Set the data */ |
211 haptic->hwdata->fd = fd; | 211 haptic->hwdata->fd = fd; |
212 haptic->supported = EV_IsHaptic(fd); | |
212 | 213 |
213 /* Set the effects */ | 214 /* Set the effects */ |
214 if (ioctl(fd, EVIOCGEFFECTS, &haptic->neffects) < 0) { | 215 if (ioctl(fd, EVIOCGEFFECTS, &haptic->neffects) < 0) { |
215 SDL_SetError("Unable to query haptic device memory."); | 216 SDL_SetError("Unable to query haptic device memory."); |
216 goto open_err; | 217 goto open_err; |