Fixed an issue that TrayMeasure doesn't work with Measure=PLUGIN.

This commit is contained in:
spx
2010-12-08 02:46:41 +00:00
parent f0f7bd9121
commit 3324084c7f
2 changed files with 15 additions and 8 deletions

View File

@ -72,7 +72,12 @@ bool CMeasurePlugin::Update()
WCHAR buffer[MAX_PATH];
GetCurrentDirectory(MAX_PATH, buffer);
SetCurrentDirectory((Rainmeter->GetSkinPath() + m_MeterWindow->GetSkinName()).c_str());
std::wstring dir = Rainmeter->GetSkinPath();
if (m_MeterWindow)
{
dir += m_MeterWindow->GetSkinName();
}
SetCurrentDirectory(dir.c_str());
if(UpdateFunc)
{
@ -180,7 +185,12 @@ void CMeasurePlugin::ReadConfig(CConfigParser& parser, const WCHAR* section)
WCHAR buffer[MAX_PATH];
GetCurrentDirectory(MAX_PATH, buffer);
SetCurrentDirectory((Rainmeter->GetSkinPath() + m_MeterWindow->GetSkinName()).c_str());
std::wstring dir = Rainmeter->GetSkinPath();
if (m_MeterWindow)
{
dir += m_MeterWindow->GetSkinName();
}
SetCurrentDirectory(dir.c_str());
// Remove current directory from DLL search path
CSystem::RmSetDllDirectory(L"");