mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Removed unneeded codes, for VC2010.
This commit is contained in:
@ -111,35 +111,24 @@ double Update2(UINT id)
|
||||
|
||||
if(measure)
|
||||
{
|
||||
// Check the platform
|
||||
OSVERSIONINFO osvi;
|
||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
if(GetVersionEx((OSVERSIONINFO*)&osvi) && osvi.dwPlatformId == VER_PLATFORM_WIN32_NT && osvi.dwMajorVersion > 4)
|
||||
{
|
||||
ULONGLONG longvalue = 0;
|
||||
longvalue = GetPerfData(measure->ObjectName.c_str(),
|
||||
measure->InstanceName.c_str(),
|
||||
measure->CounterName.c_str());
|
||||
ULONGLONG longvalue;
|
||||
longvalue = GetPerfData(measure->ObjectName.c_str(),
|
||||
measure->InstanceName.c_str(),
|
||||
measure->CounterName.c_str());
|
||||
|
||||
if(measure->Difference)
|
||||
if(measure->Difference)
|
||||
{
|
||||
// Compare with the old value
|
||||
if(!measure->FirstTime)
|
||||
{
|
||||
// Compare with the old value
|
||||
if(!measure->FirstTime)
|
||||
{
|
||||
value = (double)(longvalue - measure->OldValue);
|
||||
}
|
||||
measure->OldValue = longvalue;
|
||||
measure->FirstTime = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
value = (double)longvalue;
|
||||
value = (double)(longvalue - measure->OldValue);
|
||||
}
|
||||
measure->OldValue = longvalue;
|
||||
measure->FirstTime = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
LSLog(LOG_NOTICE, L"Rainmeter", L"PerfMon plugin works only in Win2K and later.");
|
||||
value = (double)longvalue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -611,17 +611,7 @@ void GetOSVersion(WCHAR* buffer)
|
||||
void GetOSBits(WCHAR* buffer)
|
||||
{
|
||||
SYSTEM_INFO systemInfo = {0};
|
||||
|
||||
typedef void (WINAPI *FPGETNATIVESYSTEMINFO)(LPSYSTEM_INFO lpSystemInfo);
|
||||
FPGETNATIVESYSTEMINFO GetNativeSystemInfo = (FPGETNATIVESYSTEMINFO)GetProcAddress(GetModuleHandle(L"kernel32"), "GetNativeSystemInfo");
|
||||
if (GetNativeSystemInfo != NULL)
|
||||
{
|
||||
GetNativeSystemInfo(&systemInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetSystemInfo(&systemInfo);
|
||||
}
|
||||
GetNativeSystemInfo(&systemInfo);
|
||||
|
||||
if (systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 ||
|
||||
systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64)
|
||||
|
Reference in New Issue
Block a user