Skip to content

Commit 754bbd3

Browse files
committed
f
1 parent 66200b0 commit 754bbd3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/video/windows/SDL_windowsgameinput.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ bool WIN_InitGameInput(SDL_VideoDevice *_this)
218218
{
219219
WIN_GameInputData *data;
220220
HRESULT hr;
221+
Uint64 now;
222+
uint64_t timestampUS;
221223
bool result = false;
222224

223225
if (_this->internal->gameinput_context) {
@@ -252,8 +254,8 @@ bool WIN_InitGameInput(SDL_VideoDevice *_this)
252254
}
253255

254256
// Calculate the relative offset between SDL timestamps and GameInput timestamps
255-
Uint64 now = SDL_GetTicksNS();
256-
uint64_t timestampUS = data->pGameInput->GetCurrentTimestamp();
257+
now = SDL_GetTicksNS();
258+
timestampUS = data->pGameInput->GetCurrentTimestamp();
257259
data->timestamp_offset = (SDL_NS_TO_US(now) - timestampUS);
258260

259261
result = true;

0 commit comments

Comments
 (0)