mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Make Rainmeter a singleton class
This change is part of making the Libray project more testable. The old g_Rainmeter global pointer has been replaced with a GetRainmeter() function to guarantee that the object exists in some state.
This commit is contained in:
@ -28,8 +28,6 @@ using namespace Gdiplus;
|
||||
#define PI (3.14159265f)
|
||||
#define CONVERT_TO_DEGREES(X) ((X) * (180.0f / PI))
|
||||
|
||||
extern Rainmeter* g_Rainmeter;
|
||||
|
||||
void StringToUpper(std::wstring& str)
|
||||
{
|
||||
WCHAR* srcAndDest = &str[0];
|
||||
@ -650,7 +648,7 @@ void MeterString::EnumerateInstalledFontFamilies()
|
||||
|
||||
void MeterString::InitializeStatic()
|
||||
{
|
||||
if (g_Rainmeter->GetDebug())
|
||||
if (GetRainmeter().GetDebug())
|
||||
{
|
||||
LogDebug(L"------------------------------");
|
||||
LogDebug(L"* Font families:");
|
||||
|
Reference in New Issue
Block a user