From a6f3f5f1691c0f7c050bcfb955d9f4d28538bf69 Mon Sep 17 00:00:00 2001 From: novist Date: Tue, 2 Dec 2014 15:33:53 +0200 Subject: [PATCH] Fixed getIdleTime() on windows --- src/platform/timer_win.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/platform/timer_win.cpp b/src/platform/timer_win.cpp index c15bf0047..07650a0e1 100644 --- a/src/platform/timer_win.cpp +++ b/src/platform/timer_win.cpp @@ -23,8 +23,9 @@ uint32_t Platform::getIdleTime() { LASTINPUTINFO info = { 0 }; + info.cbSize = sizeof(info); if(GetLastInputInfo(&info)) - return info.dwTime / 1000; + return GetTickCount() - info.dwTime; return 0; }