- Added the function that measures the CPU usage for multi core/processors.

For instance:

[MeasureCPU]
Measure=CPU

[MeasureCPU1]
Measure=CPU
Processor=1

[MeasureCPU2]
Measure=CPU
Processor=2

MeasureCPU returns the average of the CPU usage across all core/processors. This is same as Processor=0.

MeasureCPU1/2 returns the CPU usage of each core/processor.

-----

- Fixed the problem that the correct value is not returned if the Interface=0 in NetIn/NetOut/NetTotal measure. The cause of this problem is because the value of all filter devices is summed in Vista or newer.

-----

- Added the option (Debug) for debug logging. This must be put under [Rainmeter]-section in Rainmeter.ini.

This option specifies whether extra debugging log from Rainmeter.dll is output to Rainmeter.log.

[Rainmeter]
Debug=1

Default is 0.

-----

- Application: Fixed a wrong return value type from MainWndProc.
This commit is contained in:
spx
2010-02-13 03:07:34 +00:00
parent 506b6b84f3
commit be3b4114bb
15 changed files with 910 additions and 257 deletions

View File

@ -598,6 +598,7 @@ void RainmeterSetVariable(HWND, const char* arg)
// -----------------------------------------------------------------------------------------------
GlobalConfig CRainmeter::c_GlobalConfig;
bool CRainmeter::c_Debug = false;
/*
** CRainmeter
@ -610,6 +611,8 @@ CRainmeter::CRainmeter()
c_GlobalConfig.netInSpeed = 0;
c_GlobalConfig.netOutSpeed = 0;
c_Debug = false;
m_DesktopWorkAreaChanged = false;
m_DesktopWorkArea.left = m_DesktopWorkArea.top = m_DesktopWorkArea.right = m_DesktopWorkArea.bottom = 0;
@ -655,6 +658,8 @@ CRainmeter::~CRainmeter()
WriteStats(true);
CMeasureNet::FinalizeNewApi();
CMeterString::FreeFontCache();
GdiplusShutdown(m_GDIplusToken);
@ -879,6 +884,8 @@ int CRainmeter::Initialize(HWND Parent, HINSTANCE Instance, LPCSTR szPath)
CheckUpdate();
}
CMeasureNet::InitializeNewApi();
ResetStats();
ReadStats();
@ -1771,6 +1778,9 @@ void CRainmeter::ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow)
*/
void CRainmeter::ReadGeneralSettings(std::wstring& iniFile)
{
// Read Debug first
c_Debug = 0!=GetPrivateProfileInt(L"Rainmeter", L"Debug", 0, iniFile.c_str());
CConfigParser parser;
parser.Initialize(iniFile.c_str(), this);