# HG changeset patch # User Edgar Simo # Date 1218014602 0 # Node ID fb71df34124f786782d3182963f54dd1fc650b20 # Parent 51cadb844a9e051d57bf0d28d17684be93228699 Made prototypes for all static functions. Should compile again. diff -r 51cadb844a9e -r fb71df34124f 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;