Mercurial > sdl-ios-xcode
comparison src/haptic/linux/SDL_syshaptic.c @ 2515:030fc4375e63 gsoc2008_force_feedback
Added SDL_HapticNumEffectsPlaying().
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Thu, 10 Jul 2008 17:16:11 +0000 |
parents | 55fd9103a330 |
children | 37c13c12c878 |
comparison
equal
deleted
inserted
replaced
2514:840e1b6325c0 | 2515:030fc4375e63 |
---|---|
258 /* Set the effects */ | 258 /* Set the effects */ |
259 if (ioctl(fd, EVIOCGEFFECTS, &haptic->neffects) < 0) { | 259 if (ioctl(fd, EVIOCGEFFECTS, &haptic->neffects) < 0) { |
260 SDL_SetError("Haptic: Unable to query device memory: %s", strerror(errno)); | 260 SDL_SetError("Haptic: Unable to query device memory: %s", strerror(errno)); |
261 goto open_err; | 261 goto open_err; |
262 } | 262 } |
263 haptic->nplaying = haptic->neffects; /* Linux makes no distinction. */ | |
263 haptic->effects = (struct haptic_effect *) | 264 haptic->effects = (struct haptic_effect *) |
264 SDL_malloc(sizeof(struct haptic_effect) * haptic->neffects); | 265 SDL_malloc(sizeof(struct haptic_effect) * haptic->neffects); |
265 if (haptic->effects == NULL) { | 266 if (haptic->effects == NULL) { |
266 SDL_OutOfMemory(); | 267 SDL_OutOfMemory(); |
267 goto open_err; | 268 goto open_err; |