Additional change for r1166.

This commit is contained in:
Birunthan Mohanathas 2012-02-04 14:29:51 +00:00
parent cab05532f5
commit 913cf05a18
2 changed files with 15 additions and 2 deletions

View File

@ -88,7 +88,10 @@ void* __stdcall RmGet(void* rm, int type)
void __stdcall RmExecute(void* skin, LPCWSTR command)
{
CMeterWindow* mw = (CMeterWindow*)skin;
Rainmeter->ExecuteCommand(command, mw);
if (command)
{
Rainmeter->ExecuteCommand(command, mw);
}
}
BOOL LSLog(int nLevel, LPCWSTR unused, LPCWSTR pszMessage)

View File

@ -1899,6 +1899,7 @@ void CRainmeter::ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow)
if (meterWindow)
{
meterWindow->GetParser().ReplaceMeasures(sound);
meterWindow->MakePathAbsolute(sound);
}
@ -1914,7 +1915,16 @@ void CRainmeter::ExecuteCommand(const WCHAR* command, CMeterWindow* meterWindow)
}
// Run command
RunCommand(NULL, command, SW_SHOWNORMAL);
if (meterWindow)
{
std::wstring tmpSz = command;
meterWindow->GetParser().ReplaceMeasures(tmpSz);
RunCommand(NULL, tmpSz.c_str(), SW_SHOWNORMAL);
}
else
{
RunCommand(NULL, command, SW_SHOWNORMAL);
}
}
}