mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
The iTunes artwork path is now relative to the current skin's ini folder.
This commit is contained in:
parent
8d43999ca4
commit
428669287a
@ -314,16 +314,20 @@ static bool updateCurrentTrack()
|
|||||||
SUCCEEDED(artwork->get_Format(&artworkFormat)))
|
SUCCEEDED(artwork->get_Format(&artworkFormat)))
|
||||||
{
|
{
|
||||||
_bstr_t path;
|
_bstr_t path;
|
||||||
|
|
||||||
|
wsprintf(CurrentTrackArtworkPath, L"%s\\iTunesArtwork", BaseDir);
|
||||||
|
CreateDirectory(CurrentTrackArtworkPath, NULL);
|
||||||
|
|
||||||
switch (artworkFormat)
|
switch (artworkFormat)
|
||||||
{
|
{
|
||||||
case ITArtworkFormatJPEG:
|
case ITArtworkFormatJPEG:
|
||||||
wsprintf(CurrentTrackArtworkPath, L"%s\\Skins\\iTunes\\img\\artwork.jpg", BaseDir);
|
wcscat(CurrentTrackArtworkPath, L"\\artwork.jpg");
|
||||||
break;
|
break;
|
||||||
case ITArtworkFormatPNG :
|
case ITArtworkFormatPNG :
|
||||||
wsprintf(CurrentTrackArtworkPath, L"%s\\Skins\\iTunes\\img\\artwork.png", BaseDir);
|
wcscat(CurrentTrackArtworkPath, L"\\artwork.png");
|
||||||
break;
|
break;
|
||||||
case ITArtworkFormatBMP:
|
case ITArtworkFormatBMP:
|
||||||
wsprintf(CurrentTrackArtworkPath, L"%s\\Skins\\iTunes\\img\\artwork.bmp", BaseDir);
|
wcscat(CurrentTrackArtworkPath, L"\\artwork.bmp");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
path = CurrentTrackArtworkPath;
|
path = CurrentTrackArtworkPath;
|
||||||
@ -354,8 +358,7 @@ UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id)
|
|||||||
if (!CoInitialized)
|
if (!CoInitialized)
|
||||||
{
|
{
|
||||||
::CoInitialize(NULL);
|
::CoInitialize(NULL);
|
||||||
::GetCurrentDirectory(MAX_PATH - 1, BaseDir);
|
wcsncpy(BaseDir, iniFile, MAX_PATH);
|
||||||
::GetModuleFileName(NULL, BaseDir, MAX_PATH);
|
|
||||||
BaseDir[MAX_PATH - 1] = 0;
|
BaseDir[MAX_PATH - 1] = 0;
|
||||||
wchar_t* lastBackslash = wcsrchr(BaseDir, L'\\');
|
wchar_t* lastBackslash = wcsrchr(BaseDir, L'\\');
|
||||||
if (lastBackslash)
|
if (lastBackslash)
|
||||||
|
Loading…
Reference in New Issue
Block a user