mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
SysInfo: Idle_Time: Removed "scaling" feature and default to seconds.
This commit is contained in:
parent
de91403db9
commit
27af737a3a
@ -135,7 +135,6 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
|
|||||||
}
|
}
|
||||||
else if (_wcsicmp(L"IDLE_TIME", type) == 0)
|
else if (_wcsicmp(L"IDLE_TIME", type) == 0)
|
||||||
{
|
{
|
||||||
defaultData = 1;
|
|
||||||
measure->type = MEASURE_IDLE_TIME;
|
measure->type = MEASURE_IDLE_TIME;
|
||||||
}
|
}
|
||||||
else if (_wcsicmp(L"ADAPTER_DESCRIPTION", type) == 0)
|
else if (_wcsicmp(L"ADAPTER_DESCRIPTION", type) == 0)
|
||||||
@ -398,8 +397,7 @@ PLUGIN_EXPORT double Update(void* data)
|
|||||||
{
|
{
|
||||||
LASTINPUTINFO idle = { sizeof(LASTINPUTINFO) };
|
LASTINPUTINFO idle = { sizeof(LASTINPUTINFO) };
|
||||||
GetLastInputInfo(&idle);
|
GetLastInputInfo(&idle);
|
||||||
int scale = (measure->data < 1) ? 1 : measure->data;
|
return (double)((GetTickCount() - idle.dwTime) / 1000);
|
||||||
return (double)((GetTickCount() - idle.dwTime) / scale);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case MEASURE_INTERNET_CONNECTIVITY:
|
case MEASURE_INTERNET_CONNECTIVITY:
|
||||||
|
Loading…
Reference in New Issue
Block a user