mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Tweaks
This commit is contained in:
parent
d6a6810bd5
commit
c71585a818
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user