# HG changeset patch # User Edgar Simo # Date 1217521752 0 # Node ID 40b89e3d7ab545dce656b1a3cf07426879f98bd4 # Parent bb148126534120372a34404fb082df78b220af99 More windows haptic patches. diff -r bb1481265341 -r 40b89e3d7ab5 src/haptic/win32/SDL_syshaptic.c --- a/src/haptic/win32/SDL_syshaptic.c Thu Jul 31 16:23:52 2008 +0000 +++ b/src/haptic/win32/SDL_syshaptic.c Thu Jul 31 16:29:12 2008 +0000 @@ -74,6 +74,7 @@ struct haptic_hweffect { DIEFFECT effect; + LPDIRECTINPUTEFFECT ref; }; @@ -190,7 +191,7 @@ * Callback to get all supported effects. */ #define EFFECT_TEST(e,s) \ -if (pei->guid == &(e)) \ +if (&pei->guid == &(e)) \ haptic->supported |= (s) static BOOL CALLBACK DI_EffectCallback(LPCDIEFFECTINFO pei, LPVOID pv) @@ -978,8 +979,8 @@ /* Create the actual effect. */ ret = IDirectInputDevice2_SetParameters(effect->hweffect->ref, &temp, flags); - if (ret != FF_OK) { - SDL_SetError("Haptic: Unable to update effect: %s.", FFStrError(ret)); + if (FAILED(ret)) { + DI_SetError("Unable to update effect",ret); goto err_update; }