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:
Sam Lantinga
2022-12-02 09:03:13 -08:00
parent 1f4cc733a1
commit 0a3262e819
62 changed files with 441 additions and 313 deletions

View File

@@ -1520,6 +1520,7 @@ static int D3D_Reset(SDL_Renderer *renderer)
{
SDL_Event event;
event.type = SDL_RENDER_TARGETS_RESET;
event.common.timestamp = 0;
SDL_PushEvent(&event);
}

View File

@@ -875,6 +875,7 @@ D3D11_HandleDeviceLost(SDL_Renderer *renderer)
{
SDL_Event event;
event.type = SDL_RENDER_DEVICE_RESET;
event.common.timestamp = 0;
SDL_PushEvent(&event);
}

View File

@@ -1233,6 +1233,7 @@ D3D12_HandleDeviceLost(SDL_Renderer *renderer)
{
SDL_Event event;
event.type = SDL_RENDER_DEVICE_RESET;
event.common.timestamp = 0;
SDL_PushEvent(&event);
}