src/haptic/SDL_syshaptic.h
branchgsoc2008_force_feedback
changeset 2477 97f75ea43a93
parent 2475 4b874e3a3a2c
child 2479 b9eb2cfe16cd
     1.1 --- a/src/haptic/SDL_syshaptic.h	Mon Jun 23 09:01:58 2008 +0000
     1.2 +++ b/src/haptic/SDL_syshaptic.h	Mon Jun 30 16:48:16 2008 +0000
     1.3 @@ -25,19 +25,28 @@
     1.4  #include "SDL_haptic.h"
     1.5  
     1.6  
     1.7 +struct haptic_effect
     1.8 +{
     1.9 +   SDL_HapticEffect effect; /* The current event */
    1.10 +   struct haptic_hweffect *hweffect; /* The hardware behind the event */
    1.11 +};
    1.12 +
    1.13 +/*
    1.14 + * The real SDL_Haptic event.
    1.15 + */
    1.16  struct _SDL_Haptic
    1.17  {  
    1.18 -   Uint8 index; /* stores index it is attached to */
    1.19 -   const char* name; /* stores the name of the device */
    1.20 +   Uint8 index; /* Stores index it is attached to */
    1.21 +   const char* name; /* Stores the name of the device */
    1.22  
    1.23 -   int neffects; /* maximum amount of effects */
    1.24 -   unsigned int supported; /* supported effects */
    1.25 +   struct haptic_effect *effects; /* Allocated effects */
    1.26 +   int neffects; /* Maximum amount of effects */
    1.27 +   unsigned int supported; /* Supported effects */
    1.28  
    1.29 -   struct haptic_hwdata *hwdata; /* driver dependent */
    1.30 -   int ref_count; /* count for multiple opens */
    1.31 +   struct haptic_hwdata *hwdata; /* Driver dependent */
    1.32 +   int ref_count; /* Count for multiple opens */
    1.33  };
    1.34  
    1.35 -
    1.36  extern int SDL_SYS_HapticInit(void);
    1.37  extern const char * SDL_SYS_HapticName(int index);
    1.38  extern int SDL_SYS_HapticOpen(SDL_Haptic * haptic);