src/haptic/linux/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2478 4fd783e0f34b
parent 2477 97f75ea43a93
child 2479 b9eb2cfe16cd
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;