Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Minor corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Jul 10, 2008
1 parent ff6281b commit ace23db
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/haptic/SDL_haptic.c
Expand Up @@ -27,7 +27,6 @@

Uint8 SDL_numhaptics = 0;
SDL_Haptic **SDL_haptics = NULL;
static SDL_Haptic *default_haptic = NULL;


/*
Expand All @@ -44,15 +43,15 @@ SDL_HapticInit(void)
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;
}
Expand Down Expand Up @@ -336,13 +335,12 @@ SDL_HapticClose(SDL_Haptic * haptic)
void
SDL_HapticQuit(void)
{
SDL_numhaptics = 0;

SDL_SYS_HapticQuit();
if (SDL_haptics != NULL) {
SDL_free(SDL_haptics);
SDL_haptics = NULL;
}
SDL_numhaptics = 0;
}

/*
Expand Down

0 comments on commit ace23db

Please sign in to comment.