# HG changeset patch # User Edgar Simo # Date 1217522293 0 # Node ID c1f07fdd1e2d72702572bebb562b58ba8410e1c6 # Parent 40b89e3d7ab545dce656b1a3cf07426879f98bd4 Windows build should compile after this. diff -r 40b89e3d7ab5 -r c1f07fdd1e2d src/haptic/win32/SDL_syshaptic.c --- a/src/haptic/win32/SDL_syshaptic.c Thu Jul 31 16:29:12 2008 +0000 +++ b/src/haptic/win32/SDL_syshaptic.c Thu Jul 31 16:38:13 2008 +0000 @@ -908,7 +908,12 @@ SDL_HapticEffect * base) { HRESULT ret; - REFGUID type; + + /* Get the type. */ + REFGUID type = SDL_SYS_HapticEffectType(effect); + if (type == NULL) { + goto err_hweffect; + } /* Alloc the effect. */ effect->hweffect = (struct haptic_hweffect *) @@ -918,12 +923,6 @@ goto err_hweffect; } - /* Get the type. */ - type = SDL_SYS_HapticEffectType(effect); - if (type == NULL) { - goto err_hweffect; - } - /* Get the effect. */ if (SDL_SYS_ToDIEFFECT(haptic, &effect->hweffect->effect, base) < 0) { goto err_effectdone; @@ -978,7 +977,7 @@ DIEP_TYPESPECIFICPARAMS; /* Create the actual effect. */ - ret = IDirectInputDevice2_SetParameters(effect->hweffect->ref, &temp, flags); + ret = IDirectInputEffect_SetParameters(effect->hweffect->ref, &temp, flags); if (FAILED(ret)) { DI_SetError("Unable to update effect",ret); goto err_update;