summaryrefslogtreecommitdiff
path: root/Source/3rdParty/SDL2/src/haptic/SDL_haptic.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/3rdParty/SDL2/src/haptic/SDL_haptic.c')
-rw-r--r--Source/3rdParty/SDL2/src/haptic/SDL_haptic.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/3rdParty/SDL2/src/haptic/SDL_haptic.c b/Source/3rdParty/SDL2/src/haptic/SDL_haptic.c
index 4988c30..f23ba18 100644
--- a/Source/3rdParty/SDL2/src/haptic/SDL_haptic.c
+++ b/Source/3rdParty/SDL2/src/haptic/SDL_haptic.c
@@ -389,9 +389,11 @@ SDL_HapticClose(SDL_Haptic * haptic)
void
SDL_HapticQuit(void)
{
+ while (SDL_haptics) {
+ SDL_HapticClose(SDL_haptics);
+ }
+
SDL_SYS_HapticQuit();
- SDL_assert(SDL_haptics == NULL);
- SDL_haptics = NULL;
}
/*
@@ -765,6 +767,7 @@ SDL_HapticRumbleInit(SDL_Haptic * haptic)
SDL_zerop(efx);
if (haptic->supported & SDL_HAPTIC_SINE) {
efx->type = SDL_HAPTIC_SINE;
+ efx->periodic.direction.type = SDL_HAPTIC_CARTESIAN;
efx->periodic.period = 1000;
efx->periodic.magnitude = 0x4000;
efx->periodic.length = 5000;