mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	Fixed an issue that UpdateDivider is ignored if DynamicVariables=1 is set.
This commit is contained in:
		| @@ -276,6 +276,8 @@ void CMeter::ReadConfig(const WCHAR* section) | ||||
| 		parser.SetStyleTemplate(style); | ||||
| 	} | ||||
|  | ||||
| 	UINT oldUpdateDivider = m_UpdateDivider; | ||||
|  | ||||
| 	std::wstring oldStyleX = m_StyleX; | ||||
| 	std::wstring oldStyleY = m_StyleY; | ||||
| 	std::wstring oldStyleHidden = m_StyleHidden; | ||||
| @@ -410,7 +412,6 @@ void CMeter::ReadConfig(const WCHAR* section) | ||||
| 	m_MeasureName = parser.ReadString(section, L"MeasureName", L""); | ||||
|  | ||||
| 	m_UpdateDivider = parser.ReadInt(section, L"UpdateDivider", 1); | ||||
| 	m_UpdateCounter = m_UpdateDivider; | ||||
| 	m_AntiAlias = 0!=parser.ReadInt(section, L"AntiAlias", 0); | ||||
| 	m_DynamicVariables = 0!=parser.ReadInt(section, L"DynamicVariables", 0); | ||||
|  | ||||
| @@ -427,6 +428,12 @@ void CMeter::ReadConfig(const WCHAR* section) | ||||
| 	std::wstring group = parser.ReadString(section, L"Group", L""); | ||||
| 	InitializeGroup(group); | ||||
|  | ||||
| 	if (!m_Initialized || | ||||
| 		oldUpdateDivider != m_UpdateDivider) | ||||
| 	{ | ||||
| 		m_UpdateCounter = m_UpdateDivider; | ||||
| 	} | ||||
|  | ||||
| /* Are these necessary? | ||||
| 	if (m_W == 0 || m_H == 0) | ||||
| 	{ | ||||
|   | ||||
| @@ -2443,6 +2443,7 @@ void CMeterWindow::Update(bool nodraw) | ||||
|  | ||||
| 	// Update the meters | ||||
| 	bool bActiveTransition = false; | ||||
| 	bool bUpdate = false; | ||||
| 	std::list<CMeter*>::const_iterator j = m_Meters.begin(); | ||||
| 	for( ; j != m_Meters.end(); ++j) | ||||
| 	{ | ||||
| @@ -2453,7 +2454,10 @@ void CMeterWindow::Update(bool nodraw) | ||||
| 				(*j)->ReadConfig((*j)->GetName()); | ||||
| 				m_Parser.ClearStyleTemplate(); | ||||
| 			} | ||||
| 			(*j)->Update(); | ||||
| 			if ((*j)->Update()) | ||||
| 			{ | ||||
| 				bUpdate = true; | ||||
| 			} | ||||
| 		} | ||||
| 		catch (CError& error) | ||||
| 		{ | ||||
| @@ -2480,7 +2484,7 @@ void CMeterWindow::Update(bool nodraw) | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if (!nodraw) | ||||
| 	if (!nodraw && (m_Refreshing || bUpdate)) | ||||
| 	{ | ||||
| 		if (m_DynamicWindowSize) | ||||
| 		{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 spx
					spx