changeset 2574:c1f07fdd1e2d gsoc2008_force_feedback

Windows build should compile after this.
author Edgar Simo <bobbens@gmail.com>
date Thu, 31 Jul 2008 16:38:13 +0000
parents 40b89e3d7ab5
children 57ea8810b5f0
files src/haptic/win32/SDL_syshaptic.c
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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;