mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fix by spx for the problem where r538 caused some backwards compatibility issues.
This commit is contained in:
parent
d9a89ccdec
commit
6fe8fd0aa7
@ -28,8 +28,8 @@ LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,3,0,537
|
FILEVERSION 1,3,0,539
|
||||||
PRODUCTVERSION 1,3,0,537
|
PRODUCTVERSION 1,3,0,539
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -45,12 +45,12 @@ BEGIN
|
|||||||
BLOCK "040b04b0"
|
BLOCK "040b04b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileDescription", "Rainmeter - A Customizable Resource Meter"
|
VALUE "FileDescription", "Rainmeter - A Customizable Resource Meter"
|
||||||
VALUE "FileVersion", "1, 3, 0, 537"
|
VALUE "FileVersion", "1, 3, 0, 539"
|
||||||
VALUE "InternalName", "Rainmeter"
|
VALUE "InternalName", "Rainmeter"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2010 - Rainy"
|
VALUE "LegalCopyright", "Copyright (C) 2010 - Rainy"
|
||||||
VALUE "OriginalFilename", "Rainmeter.exe"
|
VALUE "OriginalFilename", "Rainmeter.exe"
|
||||||
VALUE "ProductName", "Rainmeter"
|
VALUE "ProductName", "Rainmeter"
|
||||||
VALUE "ProductVersion", "1, 3, 0, 537"
|
VALUE "ProductVersion", "1, 3, 0, 539"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -549,7 +549,7 @@ bool CConfigParser::ReplaceMeasures(std::wstring& result)
|
|||||||
CMeasure* measure = GetMeasure(var);
|
CMeasure* measure = GetMeasure(var);
|
||||||
if (measure)
|
if (measure)
|
||||||
{
|
{
|
||||||
std::wstring value = measure->GetStringValue(false, 1, 5, false);
|
std::wstring value = measure->GetStringValue(false, 1, -1, false);
|
||||||
|
|
||||||
// Measure found, replace it with the value
|
// Measure found, replace it with the value
|
||||||
result.replace(result.begin() + pos, result.begin() + end + 1, value);
|
result.replace(result.begin() + pos, result.begin() + end + 1, value);
|
||||||
|
@ -500,7 +500,7 @@ double CMeasure::GetValueRange()
|
|||||||
**
|
**
|
||||||
** autoScale If true, scale the value automatically to some sensible range.
|
** autoScale If true, scale the value automatically to some sensible range.
|
||||||
** scale The scale to use if autoScale is false.
|
** scale The scale to use if autoScale is false.
|
||||||
** decimals Number of decimals used in the value.
|
** decimals Number of decimals used in the value. If -1, get rid of ".00000" for dynamic variables.
|
||||||
** percentual Return the value as % from the maximum value.
|
** percentual Return the value as % from the maximum value.
|
||||||
*/
|
*/
|
||||||
const WCHAR* CMeasure::GetStringValue(bool autoScale, double scale, int decimals, bool percentual)
|
const WCHAR* CMeasure::GetStringValue(bool autoScale, double scale, int decimals, bool percentual)
|
||||||
@ -524,6 +524,16 @@ const WCHAR* CMeasure::GetStringValue(bool autoScale, double scale, int decimals
|
|||||||
val += (val >= 0) ? 0.5 : -0.5;
|
val += (val >= 0) ? 0.5 : -0.5;
|
||||||
swprintf(buffer, L"%lli", (LONGLONG)val);
|
swprintf(buffer, L"%lli", (LONGLONG)val);
|
||||||
}
|
}
|
||||||
|
else if (decimals == -1)
|
||||||
|
{
|
||||||
|
swprintf(buffer, L"%.5f", GetValue() * (1.0 / scale));
|
||||||
|
|
||||||
|
size_t len = wcslen(buffer);
|
||||||
|
if (len >= 6 && wcscmp(buffer + len - 6, L".00000") == 0)
|
||||||
|
{
|
||||||
|
buffer[len - 6] = L'\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
swprintf(format, L"%%.%if", decimals);
|
swprintf(format, L"%%.%if", decimals);
|
||||||
|
@ -2619,7 +2619,7 @@ std::wstring CRainmeter::ParseCommand(const WCHAR* command, CMeterWindow* meterW
|
|||||||
{
|
{
|
||||||
if (wcsicmp((*iter)->GetName(), measureName.c_str()) == 0)
|
if (wcsicmp((*iter)->GetName(), measureName.c_str()) == 0)
|
||||||
{
|
{
|
||||||
std::wstring value = (*iter)->GetStringValue(false, 1, 5, false);
|
std::wstring value = (*iter)->GetStringValue(false, 1, -1, false);
|
||||||
strCommand.replace(start, (end - start) + 1, value);
|
strCommand.replace(start, (end - start) + 1, value);
|
||||||
start += value.length();
|
start += value.length();
|
||||||
break;
|
break;
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
const int revision_number = 537;
|
const int revision_number = 539;
|
||||||
const bool revision_beta = true;
|
const bool revision_beta = true;
|
Loading…
Reference in New Issue
Block a user