src/joystick/haiku/SDL_haikujoystick.cc
changeset 10745 7461fcef6ae2
parent 10737 3406a0f8b041
child 10753 220a81177cfb
     1.1 --- a/src/joystick/haiku/SDL_haikujoystick.cc	Tue Jan 03 00:44:05 2017 -0800
     1.2 +++ b/src/joystick/haiku/SDL_haikujoystick.cc	Tue Jan 03 23:39:28 2017 -0800
     1.3 @@ -176,7 +176,6 @@
     1.4              SDL_HAT_LEFT,
     1.5              SDL_HAT_LEFTUP
     1.6          };
     1.7 -        const int JITTER = (32768 / 10);        /* 10% jitter threshold (ok?) */
     1.8  
     1.9          BJoystick *stick;
    1.10          int i, change;
    1.11 @@ -197,24 +196,17 @@
    1.12  
    1.13          /* Generate axis motion events */
    1.14          for (i = 0; i < joystick->naxes; ++i) {
    1.15 -            change = ((int32) axes[i] - joystick->axes[i].value);
    1.16 -            if ((change > JITTER) || (change < -JITTER)) {
    1.17 -                SDL_PrivateJoystickAxis(joystick, i, axes[i]);
    1.18 -            }
    1.19 +            SDL_PrivateJoystickAxis(joystick, i, axes[i]);
    1.20          }
    1.21  
    1.22          /* Generate hat change events */
    1.23          for (i = 0; i < joystick->nhats; ++i) {
    1.24 -            if (hats[i] != joystick->hats[i]) {
    1.25 -                SDL_PrivateJoystickHat(joystick, i, hat_map[hats[i]]);
    1.26 -            }
    1.27 +            SDL_PrivateJoystickHat(joystick, i, hat_map[hats[i]]);
    1.28          }
    1.29  
    1.30          /* Generate button events */
    1.31          for (i = 0; i < joystick->nbuttons; ++i) {
    1.32 -            if ((buttons & 0x01) != joystick->buttons[i]) {
    1.33 -                SDL_PrivateJoystickButton(joystick, i, (buttons & 0x01));
    1.34 -            }
    1.35 +            SDL_PrivateJoystickButton(joystick, i, (buttons & 0x01));
    1.36              buttons >>= 1;
    1.37          }
    1.38      }