Lines Matching refs:dest
795 SDL_SYS_ToFFEFFECT(SDL_Haptic * haptic, FFEFFECT * dest, SDL_HapticEffect * src) in SDL_SYS_ToFFEFFECT() argument
812 SDL_memset(dest, 0, sizeof(FFEFFECT)); in SDL_SYS_ToFFEFFECT()
813 dest->dwSize = sizeof(FFEFFECT); /* Set the structure size. */ in SDL_SYS_ToFFEFFECT()
814 dest->dwSamplePeriod = 0; /* Not used by us. */ in SDL_SYS_ToFFEFFECT()
815 dest->dwGain = 10000; /* Gain is set globally, not locally. */ in SDL_SYS_ToFFEFFECT()
816 dest->dwFlags = FFEFF_OBJECTOFFSETS; /* Seems obligatory. */ in SDL_SYS_ToFFEFFECT()
824 dest->lpEnvelope = envelope; in SDL_SYS_ToFFEFFECT()
829 dest->cAxes = 1; in SDL_SYS_ToFFEFFECT()
831 dest->cAxes = haptic->naxes; in SDL_SYS_ToFFEFFECT()
833 if (dest->cAxes > 0) { in SDL_SYS_ToFFEFFECT()
834 axes = SDL_malloc(sizeof(DWORD) * dest->cAxes); in SDL_SYS_ToFFEFFECT()
839 if (dest->cAxes > 1) { in SDL_SYS_ToFFEFFECT()
842 if (dest->cAxes > 2) { in SDL_SYS_ToFFEFFECT()
845 dest->rgdwAxes = axes; in SDL_SYS_ToFFEFFECT()
861 dest->cbTypeSpecificParams = sizeof(FFCONSTANTFORCE); in SDL_SYS_ToFFEFFECT()
862 dest->lpvTypeSpecificParams = constant; in SDL_SYS_ToFFEFFECT()
865 dest->dwDuration = hap_constant->length * 1000; /* In microseconds. */ in SDL_SYS_ToFFEFFECT()
866 dest->dwTriggerButton = FFGetTriggerButton(hap_constant->button); in SDL_SYS_ToFFEFFECT()
867 dest->dwTriggerRepeatInterval = hap_constant->interval; in SDL_SYS_ToFFEFFECT()
868 dest->dwStartDelay = hap_constant->delay * 1000; /* In microseconds. */ in SDL_SYS_ToFFEFFECT()
871 if (SDL_SYS_SetDirection(dest, &hap_constant->direction, dest->cAxes) in SDL_SYS_ToFFEFFECT()
880 dest->lpEnvelope = NULL; in SDL_SYS_ToFFEFFECT()
909 dest->cbTypeSpecificParams = sizeof(FFPERIODIC); in SDL_SYS_ToFFEFFECT()
910 dest->lpvTypeSpecificParams = periodic; in SDL_SYS_ToFFEFFECT()
913 dest->dwDuration = hap_periodic->length * 1000; /* In microseconds. */ in SDL_SYS_ToFFEFFECT()
914 dest->dwTriggerButton = FFGetTriggerButton(hap_periodic->button); in SDL_SYS_ToFFEFFECT()
915 dest->dwTriggerRepeatInterval = hap_periodic->interval; in SDL_SYS_ToFFEFFECT()
916 dest->dwStartDelay = hap_periodic->delay * 1000; /* In microseconds. */ in SDL_SYS_ToFFEFFECT()
919 if (SDL_SYS_SetDirection(dest, &hap_periodic->direction, dest->cAxes) in SDL_SYS_ToFFEFFECT()
928 dest->lpEnvelope = NULL; in SDL_SYS_ToFFEFFECT()
943 if (dest->cAxes > 0) { in SDL_SYS_ToFFEFFECT()
944 condition = SDL_malloc(sizeof(FFCONDITION) * dest->cAxes); in SDL_SYS_ToFFEFFECT()
951 for (i = 0; i < dest->cAxes; i++) { in SDL_SYS_ToFFEFFECT()
965 dest->cbTypeSpecificParams = sizeof(FFCONDITION) * dest->cAxes; in SDL_SYS_ToFFEFFECT()
966 dest->lpvTypeSpecificParams = condition; in SDL_SYS_ToFFEFFECT()
969 dest->dwDuration = hap_condition->length * 1000; /* In microseconds. */ in SDL_SYS_ToFFEFFECT()
970 dest->dwTriggerButton = FFGetTriggerButton(hap_condition->button); in SDL_SYS_ToFFEFFECT()
971 dest->dwTriggerRepeatInterval = hap_condition->interval; in SDL_SYS_ToFFEFFECT()
972 dest->dwStartDelay = hap_condition->delay * 1000; /* In microseconds. */ in SDL_SYS_ToFFEFFECT()
975 if (SDL_SYS_SetDirection(dest, &hap_condition->direction, dest->cAxes) in SDL_SYS_ToFFEFFECT()
981 SDL_free(dest->lpEnvelope); in SDL_SYS_ToFFEFFECT()
982 dest->lpEnvelope = NULL; in SDL_SYS_ToFFEFFECT()
997 dest->cbTypeSpecificParams = sizeof(FFRAMPFORCE); in SDL_SYS_ToFFEFFECT()
998 dest->lpvTypeSpecificParams = ramp; in SDL_SYS_ToFFEFFECT()
1001 dest->dwDuration = hap_ramp->length * 1000; /* In microseconds. */ in SDL_SYS_ToFFEFFECT()
1002 dest->dwTriggerButton = FFGetTriggerButton(hap_ramp->button); in SDL_SYS_ToFFEFFECT()
1003 dest->dwTriggerRepeatInterval = hap_ramp->interval; in SDL_SYS_ToFFEFFECT()
1004 dest->dwStartDelay = hap_ramp->delay * 1000; /* In microseconds. */ in SDL_SYS_ToFFEFFECT()
1007 if (SDL_SYS_SetDirection(dest, &hap_ramp->direction, dest->cAxes) < 0) { in SDL_SYS_ToFFEFFECT()
1014 dest->lpEnvelope = NULL; in SDL_SYS_ToFFEFFECT()
1041 dest->cbTypeSpecificParams = sizeof(FFCUSTOMFORCE); in SDL_SYS_ToFFEFFECT()
1042 dest->lpvTypeSpecificParams = custom; in SDL_SYS_ToFFEFFECT()
1045 dest->dwDuration = hap_custom->length * 1000; /* In microseconds. */ in SDL_SYS_ToFFEFFECT()
1046 dest->dwTriggerButton = FFGetTriggerButton(hap_custom->button); in SDL_SYS_ToFFEFFECT()
1047 dest->dwTriggerRepeatInterval = hap_custom->interval; in SDL_SYS_ToFFEFFECT()
1048 dest->dwStartDelay = hap_custom->delay * 1000; /* In microseconds. */ in SDL_SYS_ToFFEFFECT()
1051 if (SDL_SYS_SetDirection(dest, &hap_custom->direction, dest->cAxes) < in SDL_SYS_ToFFEFFECT()
1060 dest->lpEnvelope = NULL; in SDL_SYS_ToFFEFFECT()