Pass the OS event timestamp for keyboard, mouse, and touch events where possible
Currently implemented for Windows and Apple platforms
This commit is contained in:
parent
1f4cc733a1
commit
0a3262e819
62 changed files with 441 additions and 313 deletions
|
@ -492,6 +492,7 @@ int SDL_PrivateSensorUpdate(SDL_Sensor *sensor, Uint64 timestamp_us, float *data
|
|||
if (SDL_GetEventState(SDL_SENSORUPDATE) == SDL_ENABLE) {
|
||||
SDL_Event event;
|
||||
event.type = SDL_SENSORUPDATE;
|
||||
event.common.timestamp = 0;
|
||||
event.sensor.which = sensor->instance_id;
|
||||
num_values = SDL_min(num_values, SDL_arraysize(event.sensor.data));
|
||||
SDL_memset(event.sensor.data, 0, sizeof(event.sensor.data));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue