mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 23:31:45 +00:00
Removed SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp()
If you care about timestamps you'll also want to catch all of the sensor events instead of just polling the current state. For example, Nintendo Switch controllers generate 3 sensor events with distinct values for each polling interval.
This commit is contained in:
@@ -2981,7 +2981,6 @@ int SDL_PrivateJoystickSensor(Uint64 timestamp, SDL_Joystick *joystick, SDL_Sens
|
||||
|
||||
/* Update internal sensor state */
|
||||
SDL_memcpy(sensor->data, data, num_values * sizeof(*data));
|
||||
sensor->sensor_timestamp = sensor_timestamp;
|
||||
|
||||
/* Post the event, if desired */
|
||||
#if !SDL_EVENTS_DISABLED
|
||||
|
Reference in New Issue
Block a user