src/haptic/windows/SDL_dinputhaptic.c
changeset 13789 a359f4f93439
parent 13635 701fe6486077
child 13838 02e41b30186f
equal deleted inserted replaced
13788:56eb55f090f3 13789:a359f4f93439
   587         if (naxes > 1)
   587         if (naxes > 1)
   588             rglDir[1] = dir->dir[1];
   588             rglDir[1] = dir->dir[1];
   589         if (naxes > 2)
   589         if (naxes > 2)
   590             rglDir[2] = dir->dir[2];
   590             rglDir[2] = dir->dir[2];
   591         return 0;
   591         return 0;
   592     case SDL_HAPTIC_FIRST_AXIS:
   592     case SDL_HAPTIC_STEERING_AXIS:
   593         effect->dwFlags |= DIEFF_CARTESIAN;
   593         effect->dwFlags |= DIEFF_CARTESIAN;
   594         rglDir[0] = 0;
   594         rglDir[0] = 0;
   595         return 0;
   595         return 0;
   596 
   596 
   597     default:
   597     default:
   639     SDL_memset(envelope, 0, sizeof(DIENVELOPE));
   639     SDL_memset(envelope, 0, sizeof(DIENVELOPE));
   640     dest->lpEnvelope = envelope;
   640     dest->lpEnvelope = envelope;
   641     envelope->dwSize = sizeof(DIENVELOPE);      /* Always should be this. */
   641     envelope->dwSize = sizeof(DIENVELOPE);      /* Always should be this. */
   642 
   642 
   643     /* Axes. */
   643     /* Axes. */
   644     if (src->constant.direction.type == SDL_HAPTIC_FIRST_AXIS) {
   644     if (src->constant.direction.type == SDL_HAPTIC_STEERING_AXIS) {
   645         dest->cAxes = 1;
   645         dest->cAxes = 1;
   646     } else {
   646     } else {
   647         dest->cAxes = haptic->naxes;
   647         dest->cAxes = haptic->naxes;
   648     }
   648     }
   649     if (dest->cAxes > 0) {
   649     if (dest->cAxes > 0) {