Made prototypes for all static functions. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Wed, 06 Aug 2008 09:23:22 +0000
branchgsoc2008_force_feedback
changeset 2619 fb71df34124f
parent 2618 51cadb844a9e
child 2620 4d91a53c6f8a
Made prototypes for all static functions. Should compile again.
src/haptic/win32/SDL_syshaptic.c
--- a/src/haptic/win32/SDL_syshaptic.c	Wed Aug 06 09:22:36 2008 +0000
+++ b/src/haptic/win32/SDL_syshaptic.c	Wed Aug 06 09:23:22 2008 +0000
@@ -98,7 +98,18 @@
 /*
  * Prototypes.
  */
+static void DI_SetError(const char *str, HRESULT err);
+static int DI_GUIDIsSame(const GUID * a, const GUID * b);
+static int SDL_SYS_HapticOpenFromInstance(SDL_Haptic * haptic, DIDEVICEINSTANCE instance);
+static int SDL_SYS_HapticOpenFromDevice2(SDL_Haptic * haptic, LPDIRECTINPUTDEVICE2 device2);
+static DWORD DIGetTriggerButton( Uint16 button );
+static int SDL_SYS_SetDirection( DIEFFECT * effect, SDL_HapticDirection *dir, int naxes );
+static int SDL_SYS_ToDIEFFECT( SDL_Haptic * haptic, DIEFFECT * dest, SDL_HapticEffect * src );
+static void SDL_SYS_HapticFreeDIEFFECT( DIEFFECT * effect, int type );
+static REFGUID SDL_SYS_HapticEffectType(SDL_HapticEffect * effect);
+/* Callbacks. */
 static BOOL CALLBACK EnumHapticsCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext);
+static BOOL CALLBACK DI_EffectCallback(LPCDIEFFECTINFO pei, LPVOID pv);
 
 
 /* 
@@ -117,7 +128,7 @@
  * Checks to see if two GUID are the same.
  */
 static int
-DI_GUIDIsSame(GUID * a, GUID * b)
+DI_GUIDIsSame(const GUID * a, const GUID * b)
 {
    if (((a)->Data1 == (b)->Data1) &&
          ((a)->Data2 == (b)->Data2) &&
@@ -301,7 +312,6 @@
    HRESULT ret;
    int ret2;
    LPDIRECTINPUTDEVICE device;
-   DIPROPDWORD dipdw;
 
    /* Allocate the hwdata */
    haptic->hwdata = (struct haptic_hwdata *)
@@ -363,6 +373,7 @@
 
 {
    HRESULT ret;
+   DIPROPDWORD dipdw;
 
    /* We'll use the device2 from now on. */
    haptic->hwdata->device = device2;