src/haptic/darwin/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2604 4eee4d565368
parent 2603 a84ce5ae8936
child 2608 7c7a63f22afa
equal deleted inserted replaced
2603:a84ce5ae8936 2604:4eee4d565368
   553          rglDir[0] = dir->dir[0];
   553          rglDir[0] = dir->dir[0];
   554          return 0;
   554          return 0;
   555       case SDL_HAPTIC_CARTESIAN:
   555       case SDL_HAPTIC_CARTESIAN:
   556          effect->dwFlags |= FFEFF_CARTESIAN;
   556          effect->dwFlags |= FFEFF_CARTESIAN;
   557          rglDir[0] = dir->dir[0];
   557          rglDir[0] = dir->dir[0];
   558          rglDir[1] = dir->dir[1];
   558          if (naxes > 1)
   559          rglDir[2] = dir->dir[2];
   559             rglDir[1] = dir->dir[1];
       
   560          if (naxes > 2)
       
   561             rglDir[2] = dir->dir[2];
   560          return 0;
   562          return 0;
   561       case SDL_HAPTIC_SPHERICAL:
   563       case SDL_HAPTIC_SPHERICAL:
   562          effect->dwFlags |= FFEFF_SPHERICAL;
   564          effect->dwFlags |= FFEFF_SPHERICAL;
   563          rglDir[0] = dir->dir[0];
   565          rglDir[0] = dir->dir[0];
   564          rglDir[1] = dir->dir[1];
   566          if (naxes > 1)
   565          rglDir[2] = dir->dir[2];
   567             rglDir[1] = dir->dir[1];
       
   568          if (naxes > 2)
       
   569             rglDir[2] = dir->dir[2];
   566          return 0;
   570          return 0;
   567 
   571 
   568       default:
   572       default:
   569          SDL_SetError("Haptic: Unknown direction type.");
   573          SDL_SetError("Haptic: Unknown direction type.");
   570          return -1;
   574          return -1;