src/haptic/linux/SDL_syshaptic.c
changeset 13789 a359f4f93439
parent 13645 f7fc52b64177
child 13864 3aa34ecfeb63
equal deleted inserted replaced
13788:56eb55f090f3 13789:a359f4f93439
   716                 tmp = (((Sint32) (f * 18000. / M_PI)) + 45000) % 36000;
   716                 tmp = (((Sint32) (f * 18000. / M_PI)) + 45000) % 36000;
   717             tmp = (tmp * 0x8000) / 18000; /* convert to range [0,0xFFFF] */
   717             tmp = (tmp * 0x8000) / 18000; /* convert to range [0,0xFFFF] */
   718             *dest = (Uint16) tmp;
   718             *dest = (Uint16) tmp;
   719         }
   719         }
   720         break;
   720         break;
   721     case SDL_HAPTIC_FIRST_AXIS:
   721     case SDL_HAPTIC_STEERING_AXIS:
   722         *dest = 0x4000;
   722         *dest = 0x4000;
   723         break;
   723         break;
   724     default:
   724     default:
   725         return SDL_SetError("Haptic: Unsupported direction type.");
   725         return SDL_SetError("Haptic: Unsupported direction type.");
   726     }
   726     }