mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed issue with iTunesPlugin: http://rainmeter.net/forum/viewtopic.php?f=14&t=6363&p=40202
This commit is contained in:
parent
2e173b69d7
commit
c9c477868f
@ -436,7 +436,7 @@ function are:
|
||||
instance The instance of this DLL
|
||||
iniFile The name of the ini-file (usually Rainmeter.ini)
|
||||
section The name of the section in the ini-file for this measure
|
||||
id The identifier for the measure. This is used to identify the measures that use the same plugin.
|
||||
id The identifier for the measure. This is used to identify the measures that use the same plugin.
|
||||
*/
|
||||
UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id)
|
||||
{
|
||||
@ -781,30 +781,28 @@ void ExecuteBang(LPCTSTR args, UINT id)
|
||||
}
|
||||
}
|
||||
|
||||
if (!InstanceCreated)
|
||||
{
|
||||
if (COMMAND_POWER == command && CoInitialized && SUCCEEDED(iTunes.CreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER)))
|
||||
{
|
||||
IITBrowserWindowPtr browserWindow;
|
||||
if (SUCCEEDED(iTunes->get_BrowserWindow(&browserWindow)))
|
||||
{
|
||||
browserWindow->put_Minimized(VARIANT_TRUE);
|
||||
}
|
||||
InstanceCreated = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
switch (command)
|
||||
{
|
||||
case COMMAND_POWER:
|
||||
{
|
||||
if (!InstanceCreated)
|
||||
{
|
||||
if (COMMAND_POWER == command && CoInitialized && SUCCEEDED(iTunes.CreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER)))
|
||||
{
|
||||
IITBrowserWindowPtr browserWindow;
|
||||
if (SUCCEEDED(iTunes->get_BrowserWindow(&browserWindow)))
|
||||
{
|
||||
browserWindow->put_Minimized(VARIANT_TRUE);
|
||||
}
|
||||
InstanceCreated = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
iTunes->Quit();
|
||||
iTunes.Release();
|
||||
InstanceCreated = false;
|
||||
break;
|
||||
}
|
||||
iTunes->Quit();
|
||||
iTunes.Release();
|
||||
InstanceCreated = false;
|
||||
break;
|
||||
}
|
||||
case COMMAND_TOGGLEITUNES:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user