1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge branch 'windows-autoaway-fix'

The current way is in fact broken
This commit is contained in:
Dubslow 2014-12-03 11:54:16 -06:00
commit 8a06598af4
No known key found for this signature in database
GPG Key ID: 3DB8E05315C220AA

View File

@ -23,8 +23,9 @@
uint32_t Platform::getIdleTime() uint32_t Platform::getIdleTime()
{ {
LASTINPUTINFO info = { 0 }; LASTINPUTINFO info = { 0 };
info.cbSize = sizeof(info);
if(GetLastInputInfo(&info)) if(GetLastInputInfo(&info))
return info.dwTime / 1000; return GetTickCount() - info.dwTime;
return 0; return 0;
} }