mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
SysInfo.dll: Fixed regression from previous commit
This commit is contained in:
parent
9430c634d9
commit
f51f2aac24
@ -99,6 +99,8 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
|
||||
{
|
||||
MeasureData* measure = (MeasureData*)data;
|
||||
|
||||
int defaultData = -1;
|
||||
|
||||
LPCTSTR type = RmReadString(rm, L"SysInfoType", L"");
|
||||
if (_wcsicmp(L"COMPUTER_NAME", type) == 0)
|
||||
{
|
||||
@ -130,18 +132,22 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
|
||||
}
|
||||
else if (_wcsicmp(L"ADAPTER_DESCRIPTION", type) == 0)
|
||||
{
|
||||
defaultData = 0;
|
||||
measure->type = MEASURE_ADAPTER_DESCRIPTION;
|
||||
}
|
||||
else if (_wcsicmp(L"NET_MASK", type) == 0)
|
||||
{
|
||||
defaultData = 0;
|
||||
measure->type = MEASURE_NET_MASK;
|
||||
}
|
||||
else if (_wcsicmp(L"IP_ADDRESS", type) == 0)
|
||||
{
|
||||
defaultData = 0;
|
||||
measure->type = MEASURE_IP_ADDRESS;
|
||||
}
|
||||
else if (_wcsicmp(L"GATEWAY_ADDRESS", type) == 0)
|
||||
{
|
||||
defaultData = 0;
|
||||
measure->type = MEASURE_GATEWAY_ADDRESS;
|
||||
}
|
||||
else if (_wcsicmp(L"HOST_NAME", type) == 0)
|
||||
@ -207,7 +213,7 @@ PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
|
||||
RmLog(LOG_ERROR, buffer);
|
||||
}
|
||||
|
||||
measure->data = RmReadInt(rm, L"SysInfoData", -1);
|
||||
measure->data = RmReadInt(rm, L"SysInfoData", defaultData);
|
||||
}
|
||||
|
||||
PLUGIN_EXPORT LPCWSTR GetString(void* data)
|
||||
|
Loading…
Reference in New Issue
Block a user