# HG changeset patch # User Edgar Simo # Date 1215708163 0 # Node ID 840e1b6325c097d1cf88db1391864d27c5c2da99 # Parent 55fd9103a330825bc6f7af004bce62a78c5f6285 Minor corrections. diff -r 55fd9103a330 -r 840e1b6325c0 src/haptic/SDL_haptic.c --- a/src/haptic/SDL_haptic.c Thu Jul 10 11:39:28 2008 +0000 +++ b/src/haptic/SDL_haptic.c Thu Jul 10 16:42:43 2008 +0000 @@ -27,7 +27,6 @@ Uint8 SDL_numhaptics = 0; SDL_Haptic **SDL_haptics = NULL; -static SDL_Haptic *default_haptic = NULL; /* @@ -44,15 +43,15 @@ if (status >= 0) { arraylen = (status + 1) * sizeof(*SDL_haptics); SDL_haptics = (SDL_Haptic **) SDL_malloc(arraylen); - if (SDL_haptics == NULL) { + if (SDL_haptics == NULL) { /* Out of memory. */ SDL_numhaptics = 0; - } else { + } + else { SDL_memset(SDL_haptics, 0, arraylen); SDL_numhaptics = status; } status = 0; } - default_haptic = NULL; return status; } @@ -336,13 +335,12 @@ void SDL_HapticQuit(void) { - SDL_numhaptics = 0; - SDL_SYS_HapticQuit(); if (SDL_haptics != NULL) { SDL_free(SDL_haptics); SDL_haptics = NULL; } + SDL_numhaptics = 0; } /*