mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
IfEqualAction: Now compares the values as 64bit integer.
http://rainmeter.net/forum/viewtopic.php?p=76312#p76312
This commit is contained in:
parent
a641b64041
commit
4cecb4957e
@ -141,7 +141,7 @@ void CMeasure::ReadOptions(CConfigParser& parser, const WCHAR* section)
|
|||||||
m_IfBelowValue = parser.ReadFloat(section, L"IfBelowValue", 0.0);
|
m_IfBelowValue = parser.ReadFloat(section, L"IfBelowValue", 0.0);
|
||||||
m_IfBelowAction = parser.ReadString(section, L"IfBelowAction", L"", false);
|
m_IfBelowAction = parser.ReadString(section, L"IfBelowAction", L"", false);
|
||||||
|
|
||||||
m_IfEqualValue = parser.ReadFloat(section, L"IfEqualValue", 0.0);
|
m_IfEqualValue = (int64_t)parser.ReadFloat(section, L"IfEqualValue", 0.0);
|
||||||
m_IfEqualAction = parser.ReadString(section, L"IfEqualAction", L"", false);
|
m_IfEqualAction = parser.ReadString(section, L"IfEqualAction", L"", false);
|
||||||
|
|
||||||
m_AverageSize = parser.ReadUInt(section, L"AverageSize", 0);
|
m_AverageSize = parser.ReadUInt(section, L"AverageSize", 0);
|
||||||
@ -497,7 +497,7 @@ bool CMeasure::Update()
|
|||||||
{
|
{
|
||||||
if (!m_IfEqualAction.empty())
|
if (!m_IfEqualAction.empty())
|
||||||
{
|
{
|
||||||
if ((int)m_Value == (int)m_IfEqualValue)
|
if ((int64_t)m_Value == m_IfEqualValue)
|
||||||
{
|
{
|
||||||
if (!m_IfEqualCommitted)
|
if (!m_IfEqualCommitted)
|
||||||
{
|
{
|
||||||
@ -552,7 +552,7 @@ bool CMeasure::Update()
|
|||||||
m_Value = 0.0;
|
m_Value = 0.0;
|
||||||
|
|
||||||
// Set IfAction committed state to false if condition is not met with value = 0
|
// Set IfAction committed state to false if condition is not met with value = 0
|
||||||
if ((int)m_IfEqualValue != 0)
|
if (m_IfEqualValue != 0)
|
||||||
{
|
{
|
||||||
m_IfEqualCommitted = false;
|
m_IfEqualCommitted = false;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ protected:
|
|||||||
UINT m_AveragePos;
|
UINT m_AveragePos;
|
||||||
UINT m_AverageSize;
|
UINT m_AverageSize;
|
||||||
|
|
||||||
double m_IfEqualValue; // The limit for the IfEqual action
|
int64_t m_IfEqualValue; // The limit for the IfEqual action
|
||||||
double m_IfAboveValue; // The limit for the IfAbove action
|
double m_IfAboveValue; // The limit for the IfAbove action
|
||||||
double m_IfBelowValue; // The limit for the IfBelow action
|
double m_IfBelowValue; // The limit for the IfBelow action
|
||||||
std::wstring m_IfEqualAction; // The IfEqual action
|
std::wstring m_IfEqualAction; // The IfEqual action
|
||||||
|
Loading…
Reference in New Issue
Block a user