src/joystick/bsd/SDL_sysjoystick.c
changeset 10714 a9c15922ad7b
parent 10617 346c02ff71b6
child 10737 3406a0f8b041
equal deleted inserted replaced
10713:580fcf8605e3 10714:a9c15922ad7b
   561                             v -= (hitem.logical_maximum +
   561                             v -= (hitem.logical_maximum +
   562                                   hitem.logical_minimum + 1) / 2;
   562                                   hitem.logical_minimum + 1) / 2;
   563                             v *= 32768 /
   563                             v *= 32768 /
   564                                 ((hitem.logical_maximum -
   564                                 ((hitem.logical_maximum -
   565                                   hitem.logical_minimum + 1) / 2);
   565                                   hitem.logical_minimum + 1) / 2);
   566                             if (v != joy->axes[naxe]) {
   566                             if (v != joy->axes[naxe].value) {
   567                                 SDL_PrivateJoystickAxis(joy, naxe, v);
   567                                 SDL_PrivateJoystickAxis(joy, naxe, v);
   568                             }
   568                             }
   569                         } else if (usage == HUG_HAT_SWITCH) {
   569                         } else if (usage == HUG_HAT_SWITCH) {
   570                             v = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem);
   570                             v = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem);
   571                             SDL_PrivateJoystickHat(joy, 0,
   571                             SDL_PrivateJoystickHat(joy, 0,