comparison 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
comparison
equal deleted inserted replaced
2479:b9eb2cfe16cd 2480:b883974445fc
58 #define SDL_HAPTIC_AUTOCENTER (1<<9) 58 #define SDL_HAPTIC_AUTOCENTER (1<<9)
59 59
60 typedef struct SDL_HapticConstant { 60 typedef struct SDL_HapticConstant {
61 /* Header */ 61 /* Header */
62 Uint16 type; 62 Uint16 type;
63 Uint16 direction;
64
65 /* Replay */
63 Uint16 length; 66 Uint16 length;
64 Uint16 delay; 67 Uint16 delay;
68
69 /* Trigger */
70 Uint16 button;
71 Uint16 interval;
72
73 /* Constant */
74 Sint16 level;
75
76 /* Envelope */
77 Uint16 attack_length;
78 Uint16 attack_level;
79 Uint16 fade_length;
80 Uint16 fade_level;
81 } SDL_HapticConstant;
82 typedef struct SDL_HapticPeriodic {
83 /* Header */
84 Uint16 type;
65 Uint16 direction; 85 Uint16 direction;
66 } SDL_HapticConstant; 86
87 /* Replay */
88 Uint16 length;
89 Uint16 delay;
90
91 /* Trigger */
92 Uint16 button;
93 Uint16 interval;
94
95 /* Periodic */
96 Uint16 waveform;
97 Uint16 period;
98 Sint16 magnitude;
99 Sint16 offset;
100 Uint16 phase;
101
102 /* Envelope */
103 Uint16 attack_length;
104 Uint16 attack_level;
105 Uint16 fade_length;
106 Uint16 fade_level;
107 } SDL_HapticPeriodic;
67 108
68 typedef union SDL_HapticEffect { 109 typedef union SDL_HapticEffect {
69 /* Common for all force feedback effects */ 110 /* Common for all force feedback effects */
70 Uint16 type; /* Effect type */ 111 Uint16 type; /* Effect type */
71 SDL_HapticConstant constant; /* Constant effect */ 112 SDL_HapticConstant constant; /* Constant effect */
113 SDL_HapticPeriodic periodic; /* Periodic effect */
72 } SDL_HapticEffect; 114 } SDL_HapticEffect;
73 115
74 116
75 /* Function prototypes */ 117 /* Function prototypes */
76 /* 118 /*