SDL  2.0
SDL_windowshaptic.c
Go to the documentation of this file.
1 /*
2  Simple DirectMedia Layer
3  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
4 
5  This software is provided 'as-is', without any express or implied
6  warranty. In no event will the authors be held liable for any damages
7  arising from the use of this software.
8 
9  Permission is granted to anyone to use this software for any purpose,
10  including commercial applications, and to alter it and redistribute it
11  freely, subject to the following restrictions:
12 
13  1. The origin of this software must not be misrepresented; you must not
14  claim that you wrote the original software. If you use this software
15  in a product, an acknowledgment in the product documentation would be
16  appreciated but is not required.
17  2. Altered source versions must be plainly marked as such, and must not be
18  misrepresented as being the original software.
19  3. This notice may not be removed or altered from any source distribution.
20 */
21 #include "../../SDL_internal.h"
22 
23 #if SDL_HAPTIC_DINPUT || SDL_HAPTIC_XINPUT
24 
25 #include "SDL_assert.h"
26 #include "SDL_thread.h"
27 #include "SDL_mutex.h"
28 #include "SDL_timer.h"
29 #include "SDL_hints.h"
30 #include "SDL_haptic.h"
31 #include "../SDL_syshaptic.h"
32 #include "SDL_joystick.h"
33 #include "../../joystick/SDL_sysjoystick.h" /* For the real SDL_Joystick */
34 #include "../../joystick/windows/SDL_windowsjoystick_c.h" /* For joystick hwdata */
35 #include "../../joystick/windows/SDL_xinputjoystick_c.h" /* For xinput rumble */
36 
37 #include "SDL_windowshaptic_c.h"
38 #include "SDL_dinputhaptic_c.h"
39 #include "SDL_xinputhaptic_c.h"
40 
41 
42 /*
43  * Internal stuff.
44  */
46 static SDL_hapticlist_item *SDL_hapticlist_tail = NULL;
47 static int numhaptics = 0;
48 
49 
50 /*
51  * Initializes the haptic subsystem.
52  */
53 int
55 {
56  if (SDL_DINPUT_HapticInit() < 0) {
57  return -1;
58  }
59  if (SDL_XINPUT_HapticInit() < 0) {
60  return -1;
61  }
62  return numhaptics;
63 }
64 
65 int
67 {
68  if (SDL_hapticlist_tail == NULL) {
69  SDL_hapticlist = SDL_hapticlist_tail = item;
70  } else {
71  SDL_hapticlist_tail->next = item;
72  SDL_hapticlist_tail = item;
73  }
74 
75  /* Device has been added. */
76  ++numhaptics;
77 
78  return numhaptics;
79 }
80 
81 int
83 {
84  const int retval = item->haptic ? item->haptic->index : -1;
85  if (prev != NULL) {
86  prev->next = item->next;
87  } else {
88  SDL_assert(SDL_hapticlist == item);
89  SDL_hapticlist = item->next;
90  }
91  if (item == SDL_hapticlist_tail) {
92  SDL_hapticlist_tail = prev;
93  }
94  --numhaptics;
95  /* !!! TODO: Send a haptic remove event? */
96  SDL_free(item);
97  return retval;
98 }
99 
100 int
101 SDL_SYS_NumHaptics(void)
102 {
103  return numhaptics;
104 }
105 
106 static SDL_hapticlist_item *
107 HapticByDevIndex(int device_index)
108 {
110 
111  if ((device_index < 0) || (device_index >= numhaptics)) {
112  return NULL;
113  }
114 
115  while (device_index > 0) {
116  SDL_assert(item != NULL);
117  --device_index;
118  item = item->next;
119  }
120  return item;
121 }
122 
123 /*
124  * Return the name of a haptic device, does not need to be opened.
125  */
126 const char *
128 {
129  SDL_hapticlist_item *item = HapticByDevIndex(index);
130  return item->name;
131 }
132 
133 /*
134  * Opens a haptic device for usage.
135  */
136 int
137 SDL_SYS_HapticOpen(SDL_Haptic * haptic)
138 {
139  SDL_hapticlist_item *item = HapticByDevIndex(haptic->index);
140  if (item->bXInputHaptic) {
141  return SDL_XINPUT_HapticOpen(haptic, item);
142  } else {
143  return SDL_DINPUT_HapticOpen(haptic, item);
144  }
145 }
146 
147 
148 /*
149  * Opens a haptic device from first mouse it finds for usage.
150  */
151 int
153 {
154 #if SDL_HAPTIC_DINPUT
155  SDL_hapticlist_item *item;
156  int index = 0;
157 
158  /* Grab the first mouse haptic device we find. */
159  for (item = SDL_hapticlist; item != NULL; item = item->next) {
160  if (item->capabilities.dwDevType == DI8DEVCLASS_POINTER) {
161  return index;
162  }
163  ++index;
164  }
165 #endif /* SDL_HAPTIC_DINPUT */
166  return -1;
167 }
168 
169 
170 /*
171  * Checks to see if a joystick has haptic features.
172  */
173 int
174 SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
175 {
176  if (joystick->driver != &SDL_WINDOWS_JoystickDriver) {
177  return 0;
178  }
179 #if SDL_HAPTIC_XINPUT
180  if (joystick->hwdata->bXInputHaptic) {
181  return 1;
182  }
183 #endif
184 #if SDL_HAPTIC_DINPUT
185  if (joystick->hwdata->Capabilities.dwFlags & DIDC_FORCEFEEDBACK) {
186  return 1;
187  }
188 #endif
189  return 0;
190 }
191 
192 /*
193  * Checks to see if the haptic device and joystick are in reality the same.
194  */
195 int
196 SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick)
197 {
198  if (joystick->driver != &SDL_WINDOWS_JoystickDriver) {
199  return 0;
200  }
201  if (joystick->hwdata->bXInputHaptic != haptic->hwdata->bXInputHaptic) {
202  return 0; /* one is XInput, one is not; not the same device. */
203  } else if (joystick->hwdata->bXInputHaptic) {
204  return SDL_XINPUT_JoystickSameHaptic(haptic, joystick);
205  } else {
206  return SDL_DINPUT_JoystickSameHaptic(haptic, joystick);
207  }
208 }
209 
210 /*
211  * Opens a SDL_Haptic from a SDL_Joystick.
212  */
213 int
214 SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
215 {
216  SDL_assert(joystick->driver == &SDL_WINDOWS_JoystickDriver);
217 
218  if (joystick->hwdata->bXInputDevice) {
219  return SDL_XINPUT_HapticOpenFromJoystick(haptic, joystick);
220  } else {
221  return SDL_DINPUT_HapticOpenFromJoystick(haptic, joystick);
222  }
223 }
224 
225 /*
226  * Closes the haptic device.
227  */
228 void
229 SDL_SYS_HapticClose(SDL_Haptic * haptic)
230 {
231  if (haptic->hwdata) {
232 
233  /* Free effects. */
234  SDL_free(haptic->effects);
235  haptic->effects = NULL;
236  haptic->neffects = 0;
237 
238  /* Clean up */
239  if (haptic->hwdata->bXInputHaptic) {
241  } else {
243  }
244 
245  /* Free */
246  SDL_free(haptic->hwdata);
247  haptic->hwdata = NULL;
248  }
249 }
250 
251 /*
252  * Clean up after system specific haptic stuff
253  */
254 void
255 SDL_SYS_HapticQuit(void)
256 {
257  SDL_hapticlist_item *item;
259  SDL_Haptic *hapticitem = NULL;
260 
261  extern SDL_Haptic *SDL_haptics;
262  for (hapticitem = SDL_haptics; hapticitem; hapticitem = hapticitem->next) {
263  if ((hapticitem->hwdata->bXInputHaptic) && (hapticitem->hwdata->thread)) {
264  /* we _have_ to stop the thread before we free the XInput DLL! */
265  SDL_AtomicSet(&hapticitem->hwdata->stopThread, 1);
266  SDL_WaitThread(hapticitem->hwdata->thread, NULL);
267  hapticitem->hwdata->thread = NULL;
268  }
269  }
270 
271  for (item = SDL_hapticlist; item; item = next) {
272  /* Opened and not closed haptics are leaked, this is on purpose.
273  * Close your haptic devices after usage. */
274  /* !!! FIXME: (...is leaking on purpose a good idea?) - No, of course not. */
275  next = item->next;
276  SDL_free(item->name);
277  SDL_free(item);
278  }
279 
282 
283  numhaptics = 0;
285  SDL_hapticlist_tail = NULL;
286 }
287 
288 /*
289  * Creates a new haptic effect.
290  */
291 int
292 SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
293  SDL_HapticEffect * base)
294 {
295  int result;
296 
297  /* Alloc the effect. */
298  effect->hweffect = (struct haptic_hweffect *)
299  SDL_malloc(sizeof(struct haptic_hweffect));
300  if (effect->hweffect == NULL) {
301  SDL_OutOfMemory();
302  return -1;
303  }
304  SDL_zerop(effect->hweffect);
305 
306  if (haptic->hwdata->bXInputHaptic) {
307  result = SDL_XINPUT_HapticNewEffect(haptic, effect, base);
308  } else {
309  result = SDL_DINPUT_HapticNewEffect(haptic, effect, base);
310  }
311  if (result < 0) {
312  SDL_free(effect->hweffect);
313  effect->hweffect = NULL;
314  }
315  return result;
316 }
317 
318 /*
319  * Updates an effect.
320  */
321 int
323  struct haptic_effect *effect,
325 {
326  if (haptic->hwdata->bXInputHaptic) {
327  return SDL_XINPUT_HapticUpdateEffect(haptic, effect, data);
328  } else {
329  return SDL_DINPUT_HapticUpdateEffect(haptic, effect, data);
330  }
331 }
332 
333 /*
334  * Runs an effect.
335  */
336 int
337 SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
339 {
340  if (haptic->hwdata->bXInputHaptic) {
342  } else {
344  }
345 }
346 
347 /*
348  * Stops an effect.
349  */
350 int
351 SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
352 {
353  if (haptic->hwdata->bXInputHaptic) {
354  return SDL_XINPUT_HapticStopEffect(haptic, effect);
355  } else {
356  return SDL_DINPUT_HapticStopEffect(haptic, effect);
357  }
358 }
359 
360 /*
361  * Frees the effect.
362  */
363 void
364 SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
365 {
366  if (haptic->hwdata->bXInputHaptic) {
368  } else {
370  }
371  SDL_free(effect->hweffect);
372  effect->hweffect = NULL;
373 }
374 
375 /*
376  * Gets the status of a haptic effect.
377  */
378 int
380  struct haptic_effect *effect)
381 {
382  if (haptic->hwdata->bXInputHaptic) {
384  } else {
386  }
387 }
388 
389 /*
390  * Sets the gain.
391  */
392 int
393 SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
394 {
395  if (haptic->hwdata->bXInputHaptic) {
396  return SDL_XINPUT_HapticSetGain(haptic, gain);
397  } else {
398  return SDL_DINPUT_HapticSetGain(haptic, gain);
399  }
400 }
401 
402 /*
403  * Sets the autocentering.
404  */
405 int
406 SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter)
407 {
408  if (haptic->hwdata->bXInputHaptic) {
409  return SDL_XINPUT_HapticSetAutocenter(haptic, autocenter);
410  } else {
411  return SDL_DINPUT_HapticSetAutocenter(haptic, autocenter);
412  }
413 }
414 
415 /*
416  * Pauses the device.
417  */
418 int
419 SDL_SYS_HapticPause(SDL_Haptic * haptic)
420 {
421  if (haptic->hwdata->bXInputHaptic) {
423  } else {
425  }
426 }
427 
428 /*
429  * Pauses the device.
430  */
431 int
432 SDL_SYS_HapticUnpause(SDL_Haptic * haptic)
433 {
434  if (haptic->hwdata->bXInputHaptic) {
436  } else {
438  }
439 }
440 
441 /*
442  * Stops all the playing effects on the device.
443  */
444 int
445 SDL_SYS_HapticStopAll(SDL_Haptic * haptic)
446 {
447  if (haptic->hwdata->bXInputHaptic) {
449  } else {
451  }
452 }
453 
454 #endif /* SDL_HAPTIC_DINPUT || SDL_HAPTIC_XINPUT */
455 
456 /* vi: set ts=4 sw=4 expandtab: */
SDL_XINPUT_HapticInit
int SDL_XINPUT_HapticInit(void)
Definition: SDL_xinputhaptic.c:375
SDL_SYS_HapticPause
int SDL_SYS_HapticPause(SDL_Haptic *haptic)
SDL_XINPUT_HapticGetEffectStatus
int SDL_XINPUT_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect)
Definition: SDL_xinputhaptic.c:450
SDL_DINPUT_HapticQuit
void SDL_DINPUT_HapticQuit(void)
Definition: SDL_dinputhaptic.c:1234
SDL_DINPUT_HapticSetAutocenter
int SDL_DINPUT_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter)
Definition: SDL_dinputhaptic.c:1280
SDL_XINPUT_HapticUnpause
int SDL_XINPUT_HapticUnpause(SDL_Haptic *haptic)
Definition: SDL_xinputhaptic.c:474
SDL_XINPUT_HapticDestroyEffect
void SDL_XINPUT_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect)
Definition: SDL_xinputhaptic.c:445
SDL_XINPUT_HapticRunEffect
int SDL_XINPUT_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations)
Definition: SDL_xinputhaptic.c:433
NULL
#define NULL
Definition: begin_code.h:164
SDL_XINPUT_HapticPause
int SDL_XINPUT_HapticPause(SDL_Haptic *haptic)
Definition: SDL_xinputhaptic.c:468
SDL_timer.h
SDL_SYS_HapticName
const char * SDL_SYS_HapticName(int index)
SDL_joystick.h
SDL_XINPUT_HapticStopAll
int SDL_XINPUT_HapticStopAll(SDL_Haptic *haptic)
Definition: SDL_xinputhaptic.c:480
SDL_SYS_HapticUnpause
int SDL_SYS_HapticUnpause(SDL_Haptic *haptic)
SDL_zerop
#define SDL_zerop(x)
Definition: SDL_stdinc.h:417
SDL_XINPUT_HapticQuit
void SDL_XINPUT_HapticQuit(void)
Definition: SDL_xinputhaptic.c:416
SDL_hapticlist_item
Definition: SDL_windowshaptic_c.h:68
iterations
static int iterations
Definition: testsprite2.c:43
SDL_DINPUT_HapticRunEffect
int SDL_DINPUT_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations)
Definition: SDL_dinputhaptic.c:1251
SDL_DINPUT_HapticUnpause
int SDL_DINPUT_HapticUnpause(SDL_Haptic *haptic)
Definition: SDL_dinputhaptic.c:1292
SDL_DINPUT_HapticPause
int SDL_DINPUT_HapticPause(SDL_Haptic *haptic)
Definition: SDL_dinputhaptic.c:1286
SDL_SYS_HapticInit
int SDL_SYS_HapticInit(void)
SDL_DINPUT_HapticNewEffect
int SDL_DINPUT_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *base)
Definition: SDL_dinputhaptic.c:1239
SDL_XINPUT_HapticSetGain
int SDL_XINPUT_HapticSetGain(SDL_Haptic *haptic, int gain)
Definition: SDL_xinputhaptic.c:456
Uint32
uint32_t Uint32
Definition: SDL_stdinc.h:203
SDL_SYS_HapticUpdateEffect
int SDL_SYS_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *data)
index
GLuint index
Definition: SDL_opengl_glext.h:660
result
GLuint64EXT * result
Definition: SDL_opengl_glext.h:9432
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
SDL_SYS_HapticDestroyEffect
void SDL_SYS_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect)
SDL_DINPUT_HapticDestroyEffect
void SDL_DINPUT_HapticDestroyEffect(SDL_Haptic *haptic, struct haptic_effect *effect)
Definition: SDL_dinputhaptic.c:1263
SDL_XINPUT_HapticOpenFromJoystick
int SDL_XINPUT_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick)
Definition: SDL_xinputhaptic.c:405
SDL_SYS_HapticRunEffect
int SDL_SYS_HapticRunEffect(SDL_Haptic *haptic, struct haptic_effect *effect, Uint32 iterations)
haptic_hweffect
Definition: SDL_windowshaptic_c.h:54
SDL_haptic.h
The SDL haptic subsystem allows you to control haptic (force feedback) devices.
SDL_SYS_HapticQuit
void SDL_SYS_HapticQuit(void)
SDL_SYS_HapticSetGain
int SDL_SYS_HapticSetGain(SDL_Haptic *haptic, int gain)
SDL_XINPUT_HapticSetAutocenter
int SDL_XINPUT_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter)
Definition: SDL_xinputhaptic.c:462
SDL_thread.h
SDL_SYS_AddHapticDevice
int SDL_SYS_AddHapticDevice(SDL_hapticlist_item *item)
retval
SDL_bool retval
Definition: testgamecontroller.c:65
SDL_XINPUT_HapticClose
void SDL_XINPUT_HapticClose(SDL_Haptic *haptic)
Definition: SDL_xinputhaptic.c:411
SDL_SYS_HapticGetEffectStatus
int SDL_SYS_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect)
SDL_xinputhaptic_c.h
SDL_free
#define SDL_free
Definition: SDL_dynapi_overrides.h:377
SDL_HapticEffect
The generic template for any haptic effect.
Definition: SDL_haptic.h:801
SDL_dinputhaptic_c.h
SDL_mutex.h
SDL_SYS_HapticStopEffect
int SDL_SYS_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect)
SDL_DINPUT_HapticInit
int SDL_DINPUT_HapticInit(void)
Definition: SDL_dinputhaptic.c:1193
SDL_XINPUT_HapticOpen
int SDL_XINPUT_HapticOpen(SDL_Haptic *haptic, SDL_hapticlist_item *item)
Definition: SDL_xinputhaptic.c:393
SDL_DINPUT_HapticUpdateEffect
int SDL_DINPUT_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *data)
Definition: SDL_dinputhaptic.c:1245
SDL_assert.h
SDL_DINPUT_JoystickSameHaptic
int SDL_DINPUT_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick)
Definition: SDL_dinputhaptic.c:1217
haptic_effect
Definition: SDL_syshaptic.h:31
SDL_XINPUT_JoystickSameHaptic
int SDL_XINPUT_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick)
Definition: SDL_xinputhaptic.c:399
SDL_haptics
SDL_Haptic * SDL_haptics
Definition: SDL_haptic.c:29
SDL_SYS_HapticStopAll
int SDL_SYS_HapticStopAll(SDL_Haptic *haptic)
SDL_SYS_HapticClose
void SDL_SYS_HapticClose(SDL_Haptic *haptic)
SDL_assert
#define SDL_assert(condition)
Definition: SDL_assert.h:169
SDL_WINDOWS_JoystickDriver
SDL_JoystickDriver SDL_WINDOWS_JoystickDriver
SDL_OutOfMemory
#define SDL_OutOfMemory()
Definition: SDL_error.h:52
SDL_hapticlist_item::next
struct SDL_hapticlist_item * next
Definition: SDL_windowshaptic_c.h:77
SDL_SYS_HapticOpen
int SDL_SYS_HapticOpen(SDL_Haptic *haptic)
SDL_SYS_HapticMouse
int SDL_SYS_HapticMouse(void)
SDL_SYS_HapticNewEffect
int SDL_SYS_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *base)
SDL_XINPUT_HapticStopEffect
int SDL_XINPUT_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect)
Definition: SDL_xinputhaptic.c:439
haptic
static SDL_Haptic * haptic
Definition: testhaptic.c:25
SDL_DINPUT_HapticOpenFromJoystick
int SDL_DINPUT_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick)
Definition: SDL_dinputhaptic.c:1223
SDL_DINPUT_HapticClose
void SDL_DINPUT_HapticClose(SDL_Haptic *haptic)
Definition: SDL_dinputhaptic.c:1229
SDL_DINPUT_HapticStopEffect
int SDL_DINPUT_HapticStopEffect(SDL_Haptic *haptic, struct haptic_effect *effect)
Definition: SDL_dinputhaptic.c:1257
SDL_hapticlist_item::haptic
SDL_Haptic * haptic
Definition: SDL_windowshaptic_c.h:70
SDL_windowshaptic_c.h
SDL_DINPUT_HapticSetGain
int SDL_DINPUT_HapticSetGain(SDL_Haptic *haptic, int gain)
Definition: SDL_dinputhaptic.c:1274
SDL_DINPUT_HapticGetEffectStatus
int SDL_DINPUT_HapticGetEffectStatus(SDL_Haptic *haptic, struct haptic_effect *effect)
Definition: SDL_dinputhaptic.c:1268
SDL_DINPUT_HapticStopAll
int SDL_DINPUT_HapticStopAll(SDL_Haptic *haptic)
Definition: SDL_dinputhaptic.c:1298
SDL_SYS_HapticSetAutocenter
int SDL_SYS_HapticSetAutocenter(SDL_Haptic *haptic, int autocenter)
SDL_hints.h
SDL_hapticlist_item::name
char * name
Definition: SDL_windowshaptic_c.h:69
SDL_SYS_NumHaptics
int SDL_SYS_NumHaptics(void)
SDL_SYS_RemoveHapticDevice
int SDL_SYS_RemoveHapticDevice(SDL_hapticlist_item *prev, SDL_hapticlist_item *item)
SDL_hapticlist
SDL_hapticlist_item * SDL_hapticlist
SDL_SYS_JoystickIsHaptic
int SDL_SYS_JoystickIsHaptic(SDL_Joystick *joystick)
haptic_effect::hweffect
struct haptic_hweffect * hweffect
Definition: SDL_syshaptic.h:33
SDL_SYS_JoystickSameHaptic
int SDL_SYS_JoystickSameHaptic(SDL_Haptic *haptic, SDL_Joystick *joystick)
SDL_AtomicSet
#define SDL_AtomicSet
Definition: SDL_dynapi_overrides.h:67
SDL_malloc
#define SDL_malloc
Definition: SDL_dynapi_overrides.h:374
SDL_SYS_HapticOpenFromJoystick
int SDL_SYS_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick)
SDL_DINPUT_HapticOpen
int SDL_DINPUT_HapticOpen(SDL_Haptic *haptic, SDL_hapticlist_item *item)
Definition: SDL_dinputhaptic.c:1211
SDL_XINPUT_HapticUpdateEffect
int SDL_XINPUT_HapticUpdateEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *data)
Definition: SDL_xinputhaptic.c:427
SDL_XINPUT_HapticNewEffect
int SDL_XINPUT_HapticNewEffect(SDL_Haptic *haptic, struct haptic_effect *effect, SDL_HapticEffect *base)
Definition: SDL_xinputhaptic.c:421
SDL_WaitThread
#define SDL_WaitThread
Definition: SDL_dynapi_overrides.h:478
SDL_hapticlist_item::bXInputHaptic
SDL_bool bXInputHaptic
Definition: SDL_windowshaptic_c.h:75