Lines Matching refs:dest

675 SDL_SYS_ToDirection(Uint16 *dest, SDL_HapticDirection * src)  in SDL_SYS_ToDirection()  argument
693 *dest = (Uint16) tmp; in SDL_SYS_ToDirection()
707 *dest = (Uint16) tmp; in SDL_SYS_ToDirection()
712 *dest = (src->dir[0] >= 0 ? 0x4000 : 0xC000); in SDL_SYS_ToDirection()
714 *dest = (src->dir[1] >= 0 ? 0x8000 : 0); in SDL_SYS_ToDirection()
729 *dest = (Uint16) tmp; in SDL_SYS_ToDirection()
733 *dest = 0x4000; in SDL_SYS_ToDirection()
749 SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src) in SDL_SYS_ToFFEffect() argument
758 SDL_memset(dest, 0, sizeof(struct ff_effect)); in SDL_SYS_ToFFEffect()
765 dest->type = FF_CONSTANT; in SDL_SYS_ToFFEffect()
766 if (SDL_SYS_ToDirection(&dest->direction, &constant->direction) == -1) in SDL_SYS_ToFFEffect()
770 dest->replay.length = (constant->length == SDL_HAPTIC_INFINITY) ? in SDL_SYS_ToFFEffect()
772 dest->replay.delay = CLAMP(constant->delay); in SDL_SYS_ToFFEffect()
775 dest->trigger.button = SDL_SYS_ToButton(constant->button); in SDL_SYS_ToFFEffect()
776 dest->trigger.interval = CLAMP(constant->interval); in SDL_SYS_ToFFEffect()
779 dest->u.constant.level = constant->level; in SDL_SYS_ToFFEffect()
782 dest->u.constant.envelope.attack_length = in SDL_SYS_ToFFEffect()
784 dest->u.constant.envelope.attack_level = in SDL_SYS_ToFFEffect()
786 dest->u.constant.envelope.fade_length = CLAMP(constant->fade_length); in SDL_SYS_ToFFEffect()
787 dest->u.constant.envelope.fade_level = CLAMP(constant->fade_level); in SDL_SYS_ToFFEffect()
800 dest->type = FF_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()
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()
815 dest->u.periodic.waveform = FF_SINE; in SDL_SYS_ToFFEffect()
820 dest->u.periodic.waveform = FF_TRIANGLE; in SDL_SYS_ToFFEffect()
822 dest->u.periodic.waveform = FF_SAW_UP; 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()
834 dest->u.periodic.envelope.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()
849 dest->type = FF_SPRING; in SDL_SYS_ToFFEffect()
851 dest->type = FF_DAMPER; in SDL_SYS_ToFFEffect()
853 dest->type = FF_INERTIA; in SDL_SYS_ToFFEffect()
855 dest->type = FF_FRICTION; in SDL_SYS_ToFFEffect()
856 dest->direction = 0; /* Handled by the condition-specifics. */ in SDL_SYS_ToFFEffect()
859 dest->replay.length = (condition->length == SDL_HAPTIC_INFINITY) ? in SDL_SYS_ToFFEffect()
861 dest->replay.delay = CLAMP(condition->delay); in SDL_SYS_ToFFEffect()
864 dest->trigger.button = SDL_SYS_ToButton(condition->button); in SDL_SYS_ToFFEffect()
865 dest->trigger.interval = CLAMP(condition->interval); in SDL_SYS_ToFFEffect()
869 dest->u.condition[0].right_saturation = condition->right_sat[0]; in SDL_SYS_ToFFEffect()
870 dest->u.condition[0].left_saturation = condition->left_sat[0]; in SDL_SYS_ToFFEffect()
871 dest->u.condition[0].right_coeff = condition->right_coeff[0]; in SDL_SYS_ToFFEffect()
872 dest->u.condition[0].left_coeff = condition->left_coeff[0]; in SDL_SYS_ToFFEffect()
873 dest->u.condition[0].deadband = condition->deadband[0]; in SDL_SYS_ToFFEffect()
874 dest->u.condition[0].center = condition->center[0]; in SDL_SYS_ToFFEffect()
876 dest->u.condition[1].right_saturation = condition->right_sat[1]; in SDL_SYS_ToFFEffect()
877 dest->u.condition[1].left_saturation = condition->left_sat[1]; in SDL_SYS_ToFFEffect()
878 dest->u.condition[1].right_coeff = condition->right_coeff[1]; in SDL_SYS_ToFFEffect()
879 dest->u.condition[1].left_coeff = condition->left_coeff[1]; in SDL_SYS_ToFFEffect()
880 dest->u.condition[1].deadband = condition->deadband[1]; in SDL_SYS_ToFFEffect()
881 dest->u.condition[1].center = condition->center[1]; in SDL_SYS_ToFFEffect()
893 dest->type = FF_RAMP; in SDL_SYS_ToFFEffect()
894 if (SDL_SYS_ToDirection(&dest->direction, &ramp->direction) == -1) in SDL_SYS_ToFFEffect()
898 dest->replay.length = (ramp->length == SDL_HAPTIC_INFINITY) ? in SDL_SYS_ToFFEffect()
900 dest->replay.delay = CLAMP(ramp->delay); in SDL_SYS_ToFFEffect()
903 dest->trigger.button = SDL_SYS_ToButton(ramp->button); in SDL_SYS_ToFFEffect()
904 dest->trigger.interval = CLAMP(ramp->interval); in SDL_SYS_ToFFEffect()
907 dest->u.ramp.start_level = ramp->start; in SDL_SYS_ToFFEffect()
908 dest->u.ramp.end_level = ramp->end; in SDL_SYS_ToFFEffect()
911 dest->u.ramp.envelope.attack_length = CLAMP(ramp->attack_length); in SDL_SYS_ToFFEffect()
912 dest->u.ramp.envelope.attack_level = CLAMP(ramp->attack_level); in SDL_SYS_ToFFEffect()
913 dest->u.ramp.envelope.fade_length = CLAMP(ramp->fade_length); in SDL_SYS_ToFFEffect()
914 dest->u.ramp.envelope.fade_level = CLAMP(ramp->fade_level); in SDL_SYS_ToFFEffect()
922 dest->type = FF_RUMBLE; in SDL_SYS_ToFFEffect()
923 dest->direction = 0; in SDL_SYS_ToFFEffect()
926 dest->replay.length = (leftright->length == SDL_HAPTIC_INFINITY) ? in SDL_SYS_ToFFEffect()
930 dest->trigger.button = 0; in SDL_SYS_ToFFEffect()
931 dest->trigger.interval = 0; in SDL_SYS_ToFFEffect()
934 dest->u.rumble.strong_magnitude = CLAMP(leftright->large_magnitude) * 2; in SDL_SYS_ToFFEffect()
935 dest->u.rumble.weak_magnitude = CLAMP(leftright->small_magnitude) * 2; in SDL_SYS_ToFFEffect()