src/joystick/windows/SDL_mmjoystick.c
changeset 10717 73143fb45db3
parent 10617 346c02ff71b6
child 10724 5ea5f198879f
equal deleted inserted replaced
10716:c52451a283b5 10717:73143fb45db3
   343     for (i = 0; i < joystick->naxes; i++) {
   343     for (i = 0; i < joystick->naxes; i++) {
   344         if (joyinfo.dwFlags & flags[i]) {
   344         if (joyinfo.dwFlags & flags[i]) {
   345             value =
   345             value =
   346                 (int) (((float) pos[i] +
   346                 (int) (((float) pos[i] +
   347                         transaxis[i].offset) * transaxis[i].scale);
   347                         transaxis[i].offset) * transaxis[i].scale);
   348             change = (value - joystick->axes[i]);
   348             change = (value - joystick->axes[i].value);
   349             if ((change < -JOY_AXIS_THRESHOLD)
   349             if ((change < -JOY_AXIS_THRESHOLD)
   350                 || (change > JOY_AXIS_THRESHOLD)) {
   350                 || (change > JOY_AXIS_THRESHOLD)) {
   351                 SDL_PrivateJoystickAxis(joystick, (Uint8) i, (Sint16) value);
   351                 SDL_PrivateJoystickAxis(joystick, (Uint8) i, (Sint16) value);
   352             }
   352             }
   353         }
   353         }