diff --git a/Library/TrayWindow.h b/Library/TrayWindow.h index e669f8b8..864ecab8 100644 --- a/Library/TrayWindow.h +++ b/Library/TrayWindow.h @@ -67,8 +67,6 @@ private: void ModifyTrayIcon(double value); HICON CreateTrayIcon(double value); - HICON LoadResourceIcon(LPCWSTR name, bool large = false); - void ShowNotification(TRAY_NOTIFICATION id, const WCHAR* title, const WCHAR* text); HICON m_Icon; diff --git a/Plugins/PluginNowPlaying/NowPlaying.cpp b/Plugins/PluginNowPlaying/NowPlaying.cpp index 02bdaa8a..3fec95c8 100644 --- a/Plugins/PluginNowPlaying/NowPlaying.cpp +++ b/Plugins/PluginNowPlaying/NowPlaying.cpp @@ -28,7 +28,7 @@ #include "PlayerWMP.h" static std::vector g_ParentMeasures; -std::wstring g_SettingsFile; +bool g_Initialized = false; HINSTANCE g_Instance = NULL; BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) @@ -51,10 +51,10 @@ PLUGIN_EXPORT void Initialize(void** data, void* rm) Measure* measure = new Measure; *data = measure; - if (g_SettingsFile.empty()) + if (!g_Initialized) { - g_SettingsFile = RmGetSettingsFile(); CInternet::Initialize(); + g_Initialized = true; } } diff --git a/Plugins/PluginNowPlaying/PlayerCAD.cpp b/Plugins/PluginNowPlaying/PlayerCAD.cpp index 6b73e3fd..b2df429f 100644 --- a/Plugins/PluginNowPlaying/PlayerCAD.cpp +++ b/Plugins/PluginNowPlaying/PlayerCAD.cpp @@ -21,7 +21,6 @@ #include "CAD/cad_sdk.h" CPlayer* CPlayerCAD::c_Player = NULL; -extern std::wstring g_SettingsFile; extern HINSTANCE g_Instance; // This player emulates the CD Art Display IPC interface, which is supported by @@ -117,7 +116,7 @@ void CPlayerCAD::Initialize() } WCHAR buffer[MAX_PATH]; - LPCTSTR file = g_SettingsFile.c_str(); + LPCTSTR file = RmGetSettingsFile(); // Read saved settings GetPrivateProfileString(L"NowPlaying.dll", L"ClassName", NULL, buffer, MAX_PATH, file); @@ -363,7 +362,7 @@ LRESULT CALLBACK CPlayerCAD::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM LPCTSTR classSz = className.empty() ? NULL : className.c_str(); LPCTSTR windowSz = windowName.empty() ? NULL : windowName.c_str(); - LPCTSTR file = g_SettingsFile.c_str(); + LPCTSTR file = RmGetSettingsFile(); WritePrivateProfileString(L"NowPlaying.dll", L"ClassName", classSz, file); WritePrivateProfileString(L"NowPlaying.dll", L"WindowName", windowSz, file);