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:
@ -34,8 +34,6 @@
|
||||
|
||||
using namespace Gdiplus;
|
||||
|
||||
extern Rainmeter* g_Rainmeter;
|
||||
|
||||
/*
|
||||
** The constructor
|
||||
**
|
||||
@ -528,7 +526,7 @@ bool Meter::ReplaceMeasures(std::wstring& str, AUTOSCALE autoScale, double scale
|
||||
void Meter::CreateToolTip(MeterWindow* meterWindow)
|
||||
{
|
||||
HWND hMeterWindow = m_MeterWindow->GetWindow();
|
||||
HINSTANCE hInstance = g_Rainmeter->GetInstance();
|
||||
HINSTANCE hInstance = GetRainmeter().GetModuleInstance();
|
||||
DWORD style = WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP;
|
||||
|
||||
if (m_ToolTipType)
|
||||
|
Reference in New Issue
Block a user