Mercurial > sdl-ios-xcode
diff src/haptic/SDL_syshaptic.h @ 2477:97f75ea43a93 gsoc2008_force_feedback
Starting to add infrastructure to handle haptic effects.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Mon, 30 Jun 2008 16:48:16 +0000 |
parents | 4b874e3a3a2c |
children | b9eb2cfe16cd |
line wrap: on
line diff
--- a/src/haptic/SDL_syshaptic.h Mon Jun 23 09:01:58 2008 +0000 +++ b/src/haptic/SDL_syshaptic.h Mon Jun 30 16:48:16 2008 +0000 @@ -25,19 +25,28 @@ #include "SDL_haptic.h" +struct haptic_effect +{ + SDL_HapticEffect effect; /* The current event */ + struct haptic_hweffect *hweffect; /* The hardware behind the event */ +}; + +/* + * The real SDL_Haptic event. + */ struct _SDL_Haptic { - Uint8 index; /* stores index it is attached to */ - const char* name; /* stores the name of the device */ + Uint8 index; /* Stores index it is attached to */ + const char* name; /* Stores the name of the device */ - int neffects; /* maximum amount of effects */ - unsigned int supported; /* supported effects */ + struct haptic_effect *effects; /* Allocated effects */ + int neffects; /* Maximum amount of effects */ + unsigned int supported; /* Supported effects */ - struct haptic_hwdata *hwdata; /* driver dependent */ - int ref_count; /* count for multiple opens */ + struct haptic_hwdata *hwdata; /* Driver dependent */ + int ref_count; /* Count for multiple opens */ }; - extern int SDL_SYS_HapticInit(void); extern const char * SDL_SYS_HapticName(int index); extern int SDL_SYS_HapticOpen(SDL_Haptic * haptic);