We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66200b0 commit 754bbd3Copy full SHA for 754bbd3
src/video/windows/SDL_windowsgameinput.cpp
@@ -218,6 +218,8 @@ bool WIN_InitGameInput(SDL_VideoDevice *_this)
218
{
219
WIN_GameInputData *data;
220
HRESULT hr;
221
+ Uint64 now;
222
+ uint64_t timestampUS;
223
bool result = false;
224
225
if (_this->internal->gameinput_context) {
@@ -252,8 +254,8 @@ bool WIN_InitGameInput(SDL_VideoDevice *_this)
252
254
}
253
255
256
// Calculate the relative offset between SDL timestamps and GameInput timestamps
- Uint64 now = SDL_GetTicksNS();
- uint64_t timestampUS = data->pGameInput->GetCurrentTimestamp();
257
+ now = SDL_GetTicksNS();
258
+ timestampUS = data->pGameInput->GetCurrentTimestamp();
259
data->timestamp_offset = (SDL_NS_TO_US(now) - timestampUS);
260
261
result = true;
0 commit comments