Skip to content

Commit 28671b7

Browse files
committed
Fix some debug prints that caused errors in linux joystick
1 parent 32b6590 commit 28671b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/joystick/linux/SDL_sysjoystick.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,7 @@ static void PollAllSensors(Uint64 timestamp, SDL_Joystick *joystick)
19251925
if (ioctl(joystick->hwdata->fd_sensor, EVIOCGABS(ABS_RX + i), &absinfo) >= 0) {
19261926
values[i] = absinfo.value * (SDL_PI_F / 180.f) / joystick->hwdata->gyro_scale[i];
19271927
#ifdef DEBUG_INPUT_EVENTS
1928-
SDL_Log("Joystick : Re-read Gyro (axis %d) val= %f", i, data[i]);
1928+
SDL_Log("Joystick : Re-read Gyro (axis %d) val= %f", i, values[i]);
19291929
#endif
19301930
}
19311931
}
@@ -1939,7 +1939,7 @@ static void PollAllSensors(Uint64 timestamp, SDL_Joystick *joystick)
19391939
if (ioctl(joystick->hwdata->fd_sensor, EVIOCGABS(ABS_X + i), &absinfo) >= 0) {
19401940
values[i] = absinfo.value * SDL_STANDARD_GRAVITY / joystick->hwdata->accelerometer_scale[i];
19411941
#ifdef DEBUG_INPUT_EVENTS
1942-
SDL_Log("Joystick : Re-read Accelerometer (axis %d) val= %f", i, data[i]);
1942+
SDL_Log("Joystick : Re-read Accelerometer (axis %d) val= %f", i, values[i]);
19431943
#endif
19441944
}
19451945
}

0 commit comments

Comments
 (0)