Fixed compile errors on various platforms

This commit is contained in:
Sam Lantinga
2016-12-22 18:43:00 -07:00
parent ca019dada5
commit ad26769cd7
4 changed files with 6 additions and 4 deletions

View File

@@ -134,6 +134,7 @@ GetHIDScaledCalibratedState(recDevice * pDevice, recElement * pElement, SInt32 m
const float deviceScale = max - min;
const float readScale = pElement->maxReport - pElement->minReport;
const SInt32 value = GetHIDElementState(pDevice, pElement);
printf("MIN/MAX = %d/%d, value = %d\n", pElement->minReport, pElement->maxReport, value);
if (readScale == 0) {
return value; /* no scaling at all */
}
@@ -691,8 +692,9 @@ SDL_SYS_JoystickUpdate(SDL_Joystick * joystick)
element = device->firstAxis;
i = 0;
while (element) {
printf("Getting axis %d ", i);
value = GetHIDScaledCalibratedState(device, element, -32768, 32767);
if (value != joystick->axes[i]) {
if (value != joystick->axes[i].value) {
SDL_PrivateJoystickAxis(joystick, i, value);
}
element = element->pNext;