This commit is contained in:
Brian Ferguson 2014-02-13 09:57:08 -07:00
parent d6a6810bd5
commit c71585a818
3 changed files with 7 additions and 6 deletions

View File

@ -18,7 +18,6 @@
#include "StdAfx.h"
#include "Platform.h"
#include <string>
namespace Platform {
@ -37,9 +36,9 @@ LPCWSTR GetPlatformName()
return L"Unknown";
}
LPCWSTR GetPlatformFriendlyName()
std::wstring GetPlatformFriendlyName()
{
static std::wstring name;
std::wstring name;
WCHAR* buffer = new WCHAR[MAX_LINE_LENGTH];
DWORD size = MAX_LINE_LENGTH;
@ -88,7 +87,7 @@ LPCWSTR GetPlatformFriendlyName()
delete [] buffer;
return name.c_str();
return name;
}
/*

View File

@ -19,6 +19,8 @@
#ifndef RM_COMMON_PLATFORM_H_
#define RM_COMMON_PLATFORM_H_
#include <string>
#define MAX_LINE_LENGTH 4096
namespace Platform {
@ -31,7 +33,7 @@ typedef BOOL(WINAPI * PGETPRODUCTINFO)(DWORD dwOSMajorVersion,
PDWORD pdwReturnedProductType);
LPCWSTR GetPlatformName();
LPCWSTR GetPlatformFriendlyName();
std::wstring GetPlatformFriendlyName();
bool GetPlatformBit(bool& is64Bit);
} // namespace Platform

View File

@ -1239,7 +1239,7 @@ void DialogAbout::TabVersion::Initialize()
SetWindowText(item, tmpSz);
item = GetControl(Id_WinVerLabel);
SetWindowText(item, Platform::GetPlatformFriendlyName());
SetWindowText(item, Platform::GetPlatformFriendlyName().c_str());
item = GetControl(Id_PathLabel);
std::wstring text = L"Path: " + GetRainmeter().GetPath();