Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Windows build should compile after this.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Jul 31, 2008
1 parent 4fed009 commit 149cc3d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/haptic/win32/SDL_syshaptic.c
Expand Up @@ -908,7 +908,12 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect * effect,
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 *)
Expand All @@ -918,12 +923,6 @@ SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, struct haptic_effect * effect,
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;
Expand Down Expand Up @@ -978,7 +977,7 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
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;
Expand Down

0 comments on commit 149cc3d

Please sign in to comment.