mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	PerfMon.dll: Additional change for r1267 (5f05e79b6a).
				
					
				
			This commit is contained in:
		@@ -40,7 +40,7 @@ struct MeasureData
 | 
			
		||||
	MeasureData() :
 | 
			
		||||
		oldValue(),
 | 
			
		||||
		difference(false),
 | 
			
		||||
		firstTime(false)
 | 
			
		||||
		firstTime(true)
 | 
			
		||||
	{
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
@@ -56,29 +56,41 @@ PLUGIN_EXPORT void Initialize(void** data, void* rm)
 | 
			
		||||
PLUGIN_EXPORT void Reload(void* data, void* rm, double* maxValue)
 | 
			
		||||
{
 | 
			
		||||
	MeasureData* measure = (MeasureData*)data;
 | 
			
		||||
	bool changed = false;
 | 
			
		||||
 | 
			
		||||
	LPCWSTR value = RmReadString(rm, L"PerfMonObject", L"");
 | 
			
		||||
	if (_wcsicmp(value, measure->objectName.c_str()) != 0)
 | 
			
		||||
	{
 | 
			
		||||
		measure->objectName = value;
 | 
			
		||||
		measure->oldValue = 0;
 | 
			
		||||
		changed = true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	value = RmReadString(rm, L"PerfMonCounter", L"");
 | 
			
		||||
	if (_wcsicmp(value, measure->counterName.c_str()) != 0)
 | 
			
		||||
	{
 | 
			
		||||
		measure->objectName = value;
 | 
			
		||||
		measure->oldValue = 0;
 | 
			
		||||
		measure->counterName = value;
 | 
			
		||||
		changed = true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	value = RmReadString(rm, L"PerfMonInstance", L"");
 | 
			
		||||
	if (_wcsicmp(value, measure->instanceName.c_str()) != 0)
 | 
			
		||||
	{
 | 
			
		||||
		measure->objectName = value;
 | 
			
		||||
		measure->oldValue = 0;
 | 
			
		||||
		measure->instanceName = value;
 | 
			
		||||
		changed = true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	measure->difference = RmReadInt(rm, L"PerfMonDifference", 1) == 1;
 | 
			
		||||
	bool diff = RmReadInt(rm, L"PerfMonDifference", 1) == 1;
 | 
			
		||||
	if (diff != measure->difference)
 | 
			
		||||
	{
 | 
			
		||||
		measure->difference = diff;
 | 
			
		||||
		changed = true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (changed)
 | 
			
		||||
	{
 | 
			
		||||
		measure->oldValue = 0;
 | 
			
		||||
		measure->firstTime = true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	*maxValue = 0.0;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,21 +0,0 @@
 | 
			
		||||
#ifndef __Perfdata_h__
 | 
			
		||||
#define __Perfdata_h__
 | 
			
		||||
 | 
			
		||||
#include "titledb.h"
 | 
			
		||||
#include "perfsnap.h"
 | 
			
		||||
#include "objlist.h"
 | 
			
		||||
#include "perfobj.h"
 | 
			
		||||
#include "objinst.h"
 | 
			
		||||
#include "perfcntr.h"
 | 
			
		||||
 | 
			
		||||
/* The exported functions */
 | 
			
		||||
extern "C"
 | 
			
		||||
{
 | 
			
		||||
__declspec( dllexport ) UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id);
 | 
			
		||||
__declspec( dllexport ) void Finalize(HMODULE instance, UINT id);
 | 
			
		||||
__declspec( dllexport ) double Update2(UINT id);
 | 
			
		||||
__declspec( dllexport ) UINT GetPluginVersion();
 | 
			
		||||
__declspec( dllexport ) LPCTSTR GetPluginAuthor();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@@ -257,7 +257,6 @@
 | 
			
		||||
    <ClInclude Include="ObjInst.h" />
 | 
			
		||||
    <ClInclude Include="ObjList.h" />
 | 
			
		||||
    <ClInclude Include="PerfCntr.h" />
 | 
			
		||||
    <ClInclude Include="PerfData.h" />
 | 
			
		||||
    <ClInclude Include="PerfObj.h" />
 | 
			
		||||
    <ClInclude Include="PerfSnap.h" />
 | 
			
		||||
    <ClInclude Include="Titledb.h" />
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user