mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed bug in 1383c04
This commit is contained in:
parent
1383c046e0
commit
1a345f1ad8
@ -114,6 +114,7 @@
|
||||
<ClCompile Include="MeasureScript.cpp">
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MeasureString.cpp" />
|
||||
<ClCompile Include="MeasureTime.cpp">
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
@ -306,6 +307,7 @@
|
||||
<ClInclude Include="MeasurePlugin.h" />
|
||||
<ClInclude Include="MeasureRegistry.h" />
|
||||
<ClInclude Include="MeasureScript.h" />
|
||||
<ClInclude Include="MeasureString.h" />
|
||||
<ClInclude Include="MeasureTime.h" />
|
||||
<ClInclude Include="MeasureUptime.h" />
|
||||
<ClInclude Include="MeasureVirtualMemory.h" />
|
||||
|
@ -396,6 +396,9 @@
|
||||
<ClCompile Include="IfActions.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MeasureString.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="ConfigParser.h">
|
||||
@ -677,6 +680,9 @@
|
||||
<ClInclude Include="IfActions.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MeasureString.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Library.rc">
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "MeasureUptime.h"
|
||||
#include "MeasurePlugin.h"
|
||||
#include "MeasureRegistry.h"
|
||||
#include "MeasureString.h"
|
||||
#include "MeasureTime.h"
|
||||
#include "MeasureCalc.h"
|
||||
#include "MeasureScript.h"
|
||||
@ -795,6 +796,10 @@ Measure* Measure::Create(const WCHAR* measure, MeterWindow* meterWindow, const W
|
||||
{
|
||||
return new MeasureScript(meterWindow, name);
|
||||
}
|
||||
else if (_wcsicmp(L"String", measure) == 0)
|
||||
{
|
||||
return new MeasureString(meterWindow, name);
|
||||
}
|
||||
|
||||
LogErrorF(meterWindow, L"Measure=%s is not valid in [%s]", measure, name);
|
||||
|
||||
|
@ -96,12 +96,8 @@ void MeasureCalc::ReadOptions(ConfigParser& parser, const WCHAR* section)
|
||||
m_UpdateRandom = parser.ReadBool(section, L"UpdateRandom", false);
|
||||
const size_t range = (m_HighBound - m_LowBound) + 1;
|
||||
|
||||
m_UniqueRandom = parser.ReadBool(section, L"UniqueRandom", false);
|
||||
if (m_UniqueRandom && range > DEFAULT_UNIQUELIMIT)
|
||||
{
|
||||
m_UniqueRandom = false;
|
||||
}
|
||||
else if (!m_UniqueRandom)
|
||||
m_UniqueRandom = (range <= DEFAULT_UNIQUELIMIT) && parser.ReadBool(section, L"UniqueRandom", false);
|
||||
if (!m_UniqueRandom)
|
||||
{
|
||||
m_UniqueNumbers.clear();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user