src/joystick/bsd/SDL_sysjoystick.c
changeset 10745 7461fcef6ae2
parent 10737 3406a0f8b041
child 11811 5d94cb6b24d3
     1.1 --- a/src/joystick/bsd/SDL_sysjoystick.c	Tue Jan 03 00:44:05 2017 -0800
     1.2 +++ b/src/joystick/bsd/SDL_sysjoystick.c	Tue Jan 03 23:39:28 2017 -0800
     1.3 @@ -522,12 +522,8 @@
     1.4                  v *= 32768 / ((ymax - ymin + 1) / 2);
     1.5                  SDL_PrivateJoystickAxis(joy, 1, v);
     1.6              }
     1.7 -            if (gameport.b1 != joy->buttons[0]) {
     1.8 -                SDL_PrivateJoystickButton(joy, 0, gameport.b1);
     1.9 -            }
    1.10 -            if (gameport.b2 != joy->buttons[1]) {
    1.11 -                SDL_PrivateJoystickButton(joy, 1, gameport.b2);
    1.12 -            }
    1.13 +            SDL_PrivateJoystickButton(joy, 0, gameport.b1);
    1.14 +            SDL_PrivateJoystickButton(joy, 1, gameport.b2);
    1.15          }
    1.16          return;
    1.17      }
    1.18 @@ -563,9 +559,7 @@
    1.19                              v *= 32768 /
    1.20                                  ((hitem.logical_maximum -
    1.21                                    hitem.logical_minimum + 1) / 2);
    1.22 -                            if (v != joy->axes[naxe].value) {
    1.23 -                                SDL_PrivateJoystickAxis(joy, naxe, v);
    1.24 -                            }
    1.25 +                            SDL_PrivateJoystickAxis(joy, naxe, v);
    1.26                          } else if (usage == HUG_HAT_SWITCH) {
    1.27                              v = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem);
    1.28                              SDL_PrivateJoystickHat(joy, 0,
    1.29 @@ -576,9 +570,7 @@
    1.30                      }
    1.31                  case HUP_BUTTON:
    1.32                      v = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem);
    1.33 -                    if (joy->buttons[nbutton] != v) {
    1.34 -                        SDL_PrivateJoystickButton(joy, nbutton, v);
    1.35 -                    }
    1.36 +                    SDL_PrivateJoystickButton(joy, nbutton, v);
    1.37                      nbutton++;
    1.38                      break;
    1.39                  default: