Haptic: Fix the saturation and deadband parameters' available range.
There was a misconception that Linux's saturation and deadband parameters - on which the corresponding SDL parameters were based - use only half of the possible range. Thanks, Elias! Partially fixes Bugzilla #2686.
This commit is contained in:
parent
f703b1b22c
commit
640631c6dc
5 changed files with 20 additions and 21 deletions
|
@ -847,20 +847,18 @@ SDL_SYS_ToFFEffect(struct ff_effect *dest, SDL_HapticEffect * src)
|
|||
|
||||
/* Condition */
|
||||
/* X axis */
|
||||
dest->u.condition[0].right_saturation =
|
||||
CLAMP(condition->right_sat[0]);
|
||||
dest->u.condition[0].left_saturation = CLAMP(condition->left_sat[0]);
|
||||
dest->u.condition[0].right_saturation = condition->right_sat[0];
|
||||
dest->u.condition[0].left_saturation = condition->left_sat[0];
|
||||
dest->u.condition[0].right_coeff = condition->right_coeff[0];
|
||||
dest->u.condition[0].left_coeff = condition->left_coeff[0];
|
||||
dest->u.condition[0].deadband = CLAMP(condition->deadband[0]);
|
||||
dest->u.condition[0].deadband = condition->deadband[0];
|
||||
dest->u.condition[0].center = condition->center[0];
|
||||
/* Y axis */
|
||||
dest->u.condition[1].right_saturation =
|
||||
CLAMP(condition->right_sat[1]);
|
||||
dest->u.condition[1].left_saturation = CLAMP(condition->left_sat[1]);
|
||||
dest->u.condition[1].right_saturation = condition->right_sat[1];
|
||||
dest->u.condition[1].left_saturation = condition->left_sat[1];
|
||||
dest->u.condition[1].right_coeff = condition->right_coeff[1];
|
||||
dest->u.condition[1].left_coeff = condition->left_coeff[1];
|
||||
dest->u.condition[1].deadband = CLAMP(condition->deadband[1]);
|
||||
dest->u.condition[1].deadband = condition->deadband[1];
|
||||
dest->u.condition[1].center = condition->center[1];
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue