diff 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
line wrap: on
line diff
--- a/src/haptic/linux/SDL_syshaptic.c	Mon Jun 30 16:48:16 2008 +0000
+++ b/src/haptic/linux/SDL_syshaptic.c	Mon Jun 30 17:28:34 2008 +0000
@@ -207,8 +207,9 @@
       goto open_err;
    }
    SDL_memset(haptic->hwdata, 0, sizeof(*haptic->hwdata));
-   /* Set the hwdata */
+   /* Set the data */
    haptic->hwdata->fd = fd;
+   haptic->supported = EV_IsHaptic(fd);
 
    /* Set the effects */
    if (ioctl(fd, EVIOCGEFFECTS, &haptic->neffects) < 0) {