src/haptic/darwin/SDL_syshaptic.c
changeset 9633 3e742dd2c13d
parent 9631 e015da7884df
child 9740 55e88e3bc7cc
equal deleted inserted replaced
9632:6ae6b0b46e78 9633:3e742dd2c13d
   909 
   909 
   910     case SDL_HAPTIC_SPRING:
   910     case SDL_HAPTIC_SPRING:
   911     case SDL_HAPTIC_DAMPER:
   911     case SDL_HAPTIC_DAMPER:
   912     case SDL_HAPTIC_INERTIA:
   912     case SDL_HAPTIC_INERTIA:
   913     case SDL_HAPTIC_FRICTION:
   913     case SDL_HAPTIC_FRICTION:
       
   914         hap_condition = &src->condition;
   914         if (dest->cAxes > 0) {
   915         if (dest->cAxes > 0) {
   915             hap_condition = &src->condition;
       
   916             condition = SDL_malloc(sizeof(FFCONDITION) * dest->cAxes);
   916             condition = SDL_malloc(sizeof(FFCONDITION) * dest->cAxes);
   917             if (condition == NULL) {
   917             if (condition == NULL) {
   918                 return SDL_OutOfMemory();
   918                 return SDL_OutOfMemory();
   919             }
   919             }
   920             SDL_memset(condition, 0, sizeof(FFCONDITION));
   920             SDL_memset(condition, 0, sizeof(FFCONDITION));