diff include/SDL_haptic.h @ 2480:b883974445fc gsoc2008_force_feedback

Some more error reporting. Added periodic effect. Confirmed it works.
author Edgar Simo <bobbens@gmail.com>
date Tue, 01 Jul 2008 09:22:22 +0000
parents 4fd783e0f34b
children 5d0ea4576f20
line wrap: on
line diff
--- a/include/SDL_haptic.h	Mon Jun 30 21:38:29 2008 +0000
+++ b/include/SDL_haptic.h	Tue Jul 01 09:22:22 2008 +0000
@@ -60,15 +60,57 @@
 typedef struct SDL_HapticConstant {
    /* Header */
    Uint16 type;
+   Uint16 direction;
+
+   /* Replay */
    Uint16 length;
    Uint16 delay;
+
+   /* Trigger */
+   Uint16 button;
+   Uint16 interval;
+
+   /* Constant */
+   Sint16 level;
+
+   /* Envelope */
+   Uint16 attack_length;
+   Uint16 attack_level;
+   Uint16 fade_length;
+   Uint16 fade_level;
+} SDL_HapticConstant;
+typedef struct SDL_HapticPeriodic {
+   /* Header */
+   Uint16 type;
    Uint16 direction;
-} SDL_HapticConstant;
+
+   /* Replay */
+   Uint16 length;
+   Uint16 delay;
+
+   /* Trigger */
+   Uint16 button;
+   Uint16 interval;
+
+   /* Periodic */
+   Uint16 waveform;
+   Uint16 period;
+   Sint16 magnitude;
+   Sint16 offset;
+   Uint16 phase;
+
+   /* Envelope */
+   Uint16 attack_length;
+   Uint16 attack_level;
+   Uint16 fade_length;
+   Uint16 fade_level;
+} SDL_HapticPeriodic;
 
 typedef union SDL_HapticEffect {
    /* Common for all force feedback effects */
    Uint16 type; /* Effect type */
    SDL_HapticConstant constant; /* Constant effect */
+   SDL_HapticPeriodic periodic; /* Periodic effect */
 } SDL_HapticEffect;