1.1 --- a/src/joystick/bsd/SDL_sysjoystick.c Thu Dec 22 17:33:45 2016 -0800
1.2 +++ b/src/joystick/bsd/SDL_sysjoystick.c Thu Dec 22 18:43:00 2016 -0700
1.3 @@ -563,7 +563,7 @@
1.4 v *= 32768 /
1.5 ((hitem.logical_maximum -
1.6 hitem.logical_minimum + 1) / 2);
1.7 - if (v != joy->axes[naxe]) {
1.8 + if (v != joy->axes[naxe].value) {
1.9 SDL_PrivateJoystickAxis(joy, naxe, v);
1.10 }
1.11 } else if (usage == HUG_HAT_SWITCH) {
2.1 --- a/src/joystick/darwin/SDL_sysjoystick.c Thu Dec 22 17:33:45 2016 -0800
2.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c Thu Dec 22 18:43:00 2016 -0700
2.3 @@ -134,6 +134,7 @@
2.4 const float deviceScale = max - min;
2.5 const float readScale = pElement->maxReport - pElement->minReport;
2.6 const SInt32 value = GetHIDElementState(pDevice, pElement);
2.7 +printf("MIN/MAX = %d/%d, value = %d\n", pElement->minReport, pElement->maxReport, value);
2.8 if (readScale == 0) {
2.9 return value; /* no scaling at all */
2.10 }
2.11 @@ -691,8 +692,9 @@
2.12 element = device->firstAxis;
2.13 i = 0;
2.14 while (element) {
2.15 +printf("Getting axis %d ", i);
2.16 value = GetHIDScaledCalibratedState(device, element, -32768, 32767);
2.17 - if (value != joystick->axes[i]) {
2.18 + if (value != joystick->axes[i].value) {
2.19 SDL_PrivateJoystickAxis(joystick, i, value);
2.20 }
2.21 element = element->pNext;
3.1 --- a/src/joystick/haiku/SDL_haikujoystick.cc Thu Dec 22 17:33:45 2016 -0800
3.2 +++ b/src/joystick/haiku/SDL_haikujoystick.cc Thu Dec 22 18:43:00 2016 -0700
3.3 @@ -197,7 +197,7 @@
3.4
3.5 /* Generate axis motion events */
3.6 for (i = 0; i < joystick->naxes; ++i) {
3.7 - change = ((int32) axes[i] - joystick->axes[i]);
3.8 + change = ((int32) axes[i] - joystick->axes[i].value);
3.9 if ((change > JITTER) || (change < -JITTER)) {
3.10 SDL_PrivateJoystickAxis(joystick, i, axes[i]);
3.11 }
4.1 --- a/src/joystick/iphoneos/SDL_sysjoystick.m Thu Dec 22 17:33:45 2016 -0800
4.2 +++ b/src/joystick/iphoneos/SDL_sysjoystick.m Thu Dec 22 18:43:00 2016 -0700
4.3 @@ -516,7 +516,7 @@
4.4 * initializes its values to 0. We only want to make sure the
4.5 * player index is up to date if the user actually moves an axis. */
4.6 if ((i != 2 && i != 5) || axes[i] != -32768) {
4.7 - updateplayerindex |= (joystick->axes[i] != axes[i]);
4.8 + updateplayerindex |= (joystick->axes[i].value != axes[i]);
4.9 }
4.10 SDL_PrivateJoystickAxis(joystick, i, axes[i]);
4.11 }