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

Commit

Permalink
Using same syntax as the windows port for updating effects.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Aug 5, 2008
1 parent 37c62f5 commit 4f74e62
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/haptic/darwin/SDL_syshaptic.c
Expand Up @@ -83,6 +83,7 @@ FFStrError(HRESULT err)
switch (err) {
case FFERR_DEVICEFULL:
return "device full";
/* This should be valid, but for some reason isn't defined... */
/*case FFERR_DEVICENOTREG:
return "device not registered";*/
case FFERR_DEVICEPAUSED:
Expand Down Expand Up @@ -269,7 +270,7 @@ HIDGetDeviceProduct(io_service_t dev, char *name)


#define FF_TEST(ff, s) \
if (features.supportedEffects & ff) supported |= s
if (features.supportedEffects & (ff)) supported |= (s)
/*
* Gets supported features.
*/
Expand Down Expand Up @@ -1011,7 +1012,13 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,

/* Set the flags. Might be worthwhile to diff temp with loaded effect and
* only change those parameters. */
flags = FFEP_ALLPARAMS;
flags = FFEP_DIRECTION |
FFEP_DURATION |
FFEP_ENVELOPE |
FFEP_STARTDELAY |
FFEP_TRIGGERBUTTON |
FFEP_TRIGGERREPEATINTERVAL |
FFEP_TYPESPECIFICPARAMS;

/* Create the actual effect. */
ret = FFEffectSetParameters(effect->hweffect->ref, &temp, flags);
Expand Down

0 comments on commit 4f74e62

Please sign in to comment.