[SVN] r3698 - branches/gsoc2008_force_feedback/src/haptic
svn-owner at libsdl.org
svn-owner at libsdl.org
Thu Jul 10 09:42:43 PDT 2008
Author: bobbens
Date: 2008-07-10 09:42:43 -0700 (Thu, 10 Jul 2008)
New Revision: 3698
Modified:
branches/gsoc2008_force_feedback/src/haptic/SDL_haptic.c
Log:
Minor corrections.
Modified: branches/gsoc2008_force_feedback/src/haptic/SDL_haptic.c
===================================================================
--- branches/gsoc2008_force_feedback/src/haptic/SDL_haptic.c 2008-07-10 11:39:28 UTC (rev 3697)
+++ branches/gsoc2008_force_feedback/src/haptic/SDL_haptic.c 2008-07-10 16:42:43 UTC (rev 3698)
@@ -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;
}
/*
More information about the commits
mailing list