src/haptic/linux/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2503 84a634009a83
parent 2502 5356ca0c36a3
child 2510 e6ad7e678fca
equal deleted inserted replaced
2502:5356ca0c36a3 2503:84a634009a83
   449       case SDL_HAPTIC_INERTIA:
   449       case SDL_HAPTIC_INERTIA:
   450       case SDL_HAPTIC_FRICTION:
   450       case SDL_HAPTIC_FRICTION:
   451          condition = &src->condition;
   451          condition = &src->condition;
   452 
   452 
   453          /* Header */
   453          /* Header */
   454          if (dest->type == SDL_HAPTIC_SPRING)
   454          if (condition->type == SDL_HAPTIC_SPRING)
   455             dest->type = FF_SPRING;
   455             dest->type = FF_SPRING;
   456          else if (dest->type == SDL_HAPTIC_DAMPER)
   456          else if (condition->type == SDL_HAPTIC_DAMPER)
   457             dest->type = FF_DAMPER;
   457             dest->type = FF_DAMPER;
   458          else if (dest->type == SDL_HAPTIC_INERTIA)
   458          else if (condition->type == SDL_HAPTIC_INERTIA)
   459             dest->type = FF_INERTIA;
   459             dest->type = FF_INERTIA;
   460          else if (dest->type == SDL_HAPTIC_FRICTION)
   460          else if (condition->type == SDL_HAPTIC_FRICTION)
   461             dest->type = FF_FRICTION;
   461             dest->type = FF_FRICTION;
   462          dest->direction = 0; /* Handled by the condition-specifics. */
   462          dest->direction = 0; /* Handled by the condition-specifics. */
   463 
   463 
   464          /* Replay */
   464          /* Replay */
   465          dest->replay.length = CLAMP(condition->length);
   465          dest->replay.length = CLAMP(condition->length);