src/haptic/linux/SDL_syshaptic.c
changeset 9070 8973a237f360
parent 9069 16b5dda99337
child 9249 35a4fab04296
equal deleted inserted replaced
9069:16b5dda99337 9070:8973a237f360
   845         dest->trigger.button = SDL_SYS_ToButton(condition->button);
   845         dest->trigger.button = SDL_SYS_ToButton(condition->button);
   846         dest->trigger.interval = CLAMP(condition->interval);
   846         dest->trigger.interval = CLAMP(condition->interval);
   847 
   847 
   848         /* Condition */
   848         /* Condition */
   849         /* X axis */
   849         /* X axis */
   850         dest->u.condition[0].right_saturation =
   850         dest->u.condition[0].right_saturation = condition->right_sat[0];
   851             CLAMP(condition->right_sat[0]);
   851         dest->u.condition[0].left_saturation = condition->left_sat[0];
   852         dest->u.condition[0].left_saturation = CLAMP(condition->left_sat[0]);
       
   853         dest->u.condition[0].right_coeff = condition->right_coeff[0];
   852         dest->u.condition[0].right_coeff = condition->right_coeff[0];
   854         dest->u.condition[0].left_coeff = condition->left_coeff[0];
   853         dest->u.condition[0].left_coeff = condition->left_coeff[0];
   855         dest->u.condition[0].deadband = CLAMP(condition->deadband[0]);
   854         dest->u.condition[0].deadband = condition->deadband[0];
   856         dest->u.condition[0].center = condition->center[0];
   855         dest->u.condition[0].center = condition->center[0];
   857         /* Y axis */
   856         /* Y axis */
   858         dest->u.condition[1].right_saturation =
   857         dest->u.condition[1].right_saturation = condition->right_sat[1];
   859             CLAMP(condition->right_sat[1]);
   858         dest->u.condition[1].left_saturation = condition->left_sat[1];
   860         dest->u.condition[1].left_saturation = CLAMP(condition->left_sat[1]);
       
   861         dest->u.condition[1].right_coeff = condition->right_coeff[1];
   859         dest->u.condition[1].right_coeff = condition->right_coeff[1];
   862         dest->u.condition[1].left_coeff = condition->left_coeff[1];
   860         dest->u.condition[1].left_coeff = condition->left_coeff[1];
   863         dest->u.condition[1].deadband = CLAMP(condition->deadband[1]);
   861         dest->u.condition[1].deadband = condition->deadband[1];
   864         dest->u.condition[1].center = condition->center[1];
   862         dest->u.condition[1].center = condition->center[1];
   865 
   863 
   866         /*
   864         /*
   867          * There is no envelope in the linux force feedback api for conditions.
   865          * There is no envelope in the linux force feedback api for conditions.
   868          */
   866          */