Mercurial > sdl-ios-xcode
changeset 2619:fb71df34124f gsoc2008_force_feedback
Made prototypes for all static functions.
Should compile again.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Wed, 06 Aug 2008 09:23:22 +0000 |
parents | 51cadb844a9e |
children | 4d91a53c6f8a |
files | src/haptic/win32/SDL_syshaptic.c |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;