diff src/haptic/nds/SDL_syshaptic.c @ 5275:7aba0406c273

Frank Zago to sdl The following patch fixes some of the bitrot for the Nintendo DS port. The support is still basic at the moment, but it allows to run the "general" test under the current head of tree (parent: 5269:11bd1585efb5 tip). Most of the patch is mine, but I integrated a couple changes that John Magnotti posted on Feb 1st.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 12 Feb 2011 11:36:56 -0800
parents d6adaafcfb10
children
line wrap: on
line diff
--- a/src/haptic/nds/SDL_syshaptic.c	Sat Feb 12 10:13:53 2011 -0800
+++ b/src/haptic/nds/SDL_syshaptic.c	Sat Feb 12 11:36:56 2011 -0800
@@ -26,21 +26,21 @@
 #include "SDL_haptic.h"
 #include "../SDL_syshaptic.h"
 #include "SDL_joystick.h"
+#include <nds/memory.h>
 #include <nds/arm9/rumble.h>
-#include <nds/memory.h>
 
 #define MAX_HAPTICS  1
 /* right now only the ezf3in1 (and maybe official rumble pak) are supported
    and there can only be one of those in at a time (in GBA slot.) */
 
-SDL_Haptic *nds_haptic = NULL;
+static SDL_Haptic *nds_haptic = NULL;
 
-typedef struct
+struct haptic_hwdata
 {
     enum
     { NONE, OFFICIAL, EZF3IN1 } type;
     int pos;
-} NDS_HapticData;
+};
 
 
 void
@@ -165,7 +165,7 @@
         return -1;
     }
 
-    haptic->hwdata = SDL_malloc(sizeof(NDS_HapticData));
+    haptic->hwdata = SDL_malloc(sizeof(struct haptic_hwdata));
     if (!haptic->hwdata) {
         SDL_OutOfMemory();
         return -1;