Lines Matching refs:periodic
752 SDL_HapticPeriodic *periodic; in SDL_SYS_ToFFEffect() local
797 periodic = &src->periodic; in SDL_SYS_ToFFEffect()
801 if (SDL_SYS_ToDirection(&dest->direction, &periodic->direction) == -1) in SDL_SYS_ToFFEffect()
805 dest->replay.length = (periodic->length == SDL_HAPTIC_INFINITY) ? in SDL_SYS_ToFFEffect()
806 0 : CLAMP(periodic->length); in SDL_SYS_ToFFEffect()
807 dest->replay.delay = CLAMP(periodic->delay); in SDL_SYS_ToFFEffect()
810 dest->trigger.button = SDL_SYS_ToButton(periodic->button); in SDL_SYS_ToFFEffect()
811 dest->trigger.interval = CLAMP(periodic->interval); in SDL_SYS_ToFFEffect()
814 if (periodic->type == SDL_HAPTIC_SINE) in SDL_SYS_ToFFEffect()
815 dest->u.periodic.waveform = FF_SINE; in SDL_SYS_ToFFEffect()
819 else if (periodic->type == SDL_HAPTIC_TRIANGLE) in SDL_SYS_ToFFEffect()
820 dest->u.periodic.waveform = FF_TRIANGLE; in SDL_SYS_ToFFEffect()
821 else if (periodic->type == SDL_HAPTIC_SAWTOOTHUP) in SDL_SYS_ToFFEffect()
822 dest->u.periodic.waveform = FF_SAW_UP; in SDL_SYS_ToFFEffect()
823 else if (periodic->type == SDL_HAPTIC_SAWTOOTHDOWN) in SDL_SYS_ToFFEffect()
824 dest->u.periodic.waveform = FF_SAW_DOWN; in SDL_SYS_ToFFEffect()
825 dest->u.periodic.period = CLAMP(periodic->period); in SDL_SYS_ToFFEffect()
826 dest->u.periodic.magnitude = periodic->magnitude; in SDL_SYS_ToFFEffect()
827 dest->u.periodic.offset = periodic->offset; in SDL_SYS_ToFFEffect()
829 dest->u.periodic.phase = ((Uint32)periodic->phase * 0x10000U) / 36000; in SDL_SYS_ToFFEffect()
832 dest->u.periodic.envelope.attack_length = in SDL_SYS_ToFFEffect()
833 CLAMP(periodic->attack_length); in SDL_SYS_ToFFEffect()
834 dest->u.periodic.envelope.attack_level = in SDL_SYS_ToFFEffect()
835 CLAMP(periodic->attack_level); in SDL_SYS_ToFFEffect()
836 dest->u.periodic.envelope.fade_length = CLAMP(periodic->fade_length); in SDL_SYS_ToFFEffect()
837 dest->u.periodic.envelope.fade_level = CLAMP(periodic->fade_level); in SDL_SYS_ToFFEffect()