Commit dc60324d authored by Carlos Lozano's avatar Carlos Lozano Committed by Alexandre Julliard

Fixed SHGFI_SYSICONINDEX flag handling.

parent 0cf75338
......@@ -410,13 +410,21 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
{
if (!strcmp("%1",sTemp)) /* icon is in the file */
strcpy(sTemp, path);
IconNotYetLoaded=FALSE;
/* FIXME: is it working correctly? */
PrivateExtractIconsA(sTemp,dwNr,(flags&SHGFI_LARGEICON) ?
GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXSMICON),
(flags&SHGFI_LARGEICON) ? GetSystemMetrics(SM_CYICON) :
GetSystemMetrics(SM_CYSMICON), &psfi->hIcon,0,1,0);
if (flags & SHGFI_SYSICONINDEX)
{
psfi->iIcon = SIC_GetIconIndex(sTemp,dwNr);
if (psfi->iIcon == -1) psfi->iIcon = 0;
}
else
{
IconNotYetLoaded=FALSE;
PrivateExtractIconsA(sTemp,dwNr,(flags&SHGFI_LARGEICON) ?
GetSystemMetrics(SM_CXICON) : GetSystemMetrics(SM_CXSMICON),
(flags&SHGFI_LARGEICON) ? GetSystemMetrics(SM_CYICON) :
GetSystemMetrics(SM_CYSMICON), &psfi->hIcon,0,1,0);
psfi->iIcon = dwNr;
}
}
}
}
......
......@@ -54,6 +54,7 @@ BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList)
BOOL SIC_Initialize(void);
void SIC_Destroy(void);
BOOL PidlToSicIndex (IShellFolder * sh, LPITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, UINT * pIndex);
INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex );
/* Classes Root */
BOOL HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment