mirror of
https://github.com/encounter/SDL.git
synced 2025-12-11 22:44:17 +00:00
Added microsecond timestamp to sensor values for PS4 and PS5 controllers using the HIDAPI driver
This commit is contained in:
@@ -592,12 +592,13 @@ loop(void *arg)
|
||||
#define VERBOSE_SENSORS
|
||||
#ifdef VERBOSE_SENSORS
|
||||
case SDL_CONTROLLERSENSORUPDATE:
|
||||
SDL_Log("Controller %d sensor %s: %.2f, %.2f, %.2f\n",
|
||||
SDL_Log("Controller %d sensor %s: %.2f, %.2f, %.2f (%"SDL_PRIu64")\n",
|
||||
event.csensor.which,
|
||||
GetSensorName((SDL_SensorType)event.csensor.sensor),
|
||||
event.csensor.data[0],
|
||||
event.csensor.data[1],
|
||||
event.csensor.data[2]);
|
||||
event.csensor.data[2],
|
||||
event.csensor.timestamp_us);
|
||||
break;
|
||||
#endif /* VERBOSE_SENSORS */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user