src/haptic/darwin/SDL_syshaptic.c
changeset 13789 a359f4f93439
parent 13635 701fe6486077
child 13860 d16844f83bfd
equal deleted inserted replaced
13788:56eb55f090f3 13789:a359f4f93439
   763         }
   763         }
   764         if (naxes > 2) {
   764         if (naxes > 2) {
   765             rglDir[2] = dir->dir[2];
   765             rglDir[2] = dir->dir[2];
   766         }
   766         }
   767         return 0;
   767         return 0;
   768     case SDL_HAPTIC_FIRST_AXIS:
   768     case SDL_HAPTIC_STEERING_AXIS:
   769         effect->dwFlags |= FFEFF_CARTESIAN;
   769         effect->dwFlags |= FFEFF_CARTESIAN;
   770         rglDir[0] = 0;
   770         rglDir[0] = 0;
   771         return 0;
   771         return 0;
   772 
   772 
   773     default:
   773     default:
   815     SDL_memset(envelope, 0, sizeof(FFENVELOPE));
   815     SDL_memset(envelope, 0, sizeof(FFENVELOPE));
   816     dest->lpEnvelope = envelope;
   816     dest->lpEnvelope = envelope;
   817     envelope->dwSize = sizeof(FFENVELOPE);      /* Always should be this. */
   817     envelope->dwSize = sizeof(FFENVELOPE);      /* Always should be this. */
   818 
   818 
   819     /* Axes. */
   819     /* Axes. */
   820     if (src->constant.direction.type == SDL_HAPTIC_FIRST_AXIS) {
   820     if (src->constant.direction.type == SDL_HAPTIC_STEERING_AXIS) {
   821         dest->cAxes = 1;
   821         dest->cAxes = 1;
   822     } else {
   822     } else {
   823         dest->cAxes = haptic->naxes;
   823         dest->cAxes = haptic->naxes;
   824     }
   824     }
   825     if (dest->cAxes > 0) {
   825     if (dest->cAxes > 0) {