mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-03 01:12:51 +00:00
winemenubuilder: Load only low bit count icons if we are going to save to XPM format.
This commit is contained in:
parent
fd56bf6d0f
commit
67bdd633b2
|
@ -684,8 +684,13 @@ static BOOL extract_icon32(LPCWSTR szFileName, int nIndex, char *szXPMFileName)
|
|||
{
|
||||
if ((pIconDir = LockResource(hResData)))
|
||||
{
|
||||
lpName = MAKEINTRESOURCEW(pIconDir->idEntries[0].nID); /* default to first entry */
|
||||
for (i = 0; i < pIconDir->idCount; i++)
|
||||
{
|
||||
#ifndef SONAME_LIBPNG
|
||||
if (pIconDir->idEntries[i].wBitCount != 4 && pIconDir->idEntries[i].wBitCount != 8)
|
||||
continue;
|
||||
#endif
|
||||
if (pIconDir->idEntries[i].wBitCount >= nMaxBits)
|
||||
{
|
||||
if ((pIconDir->idEntries[i].bHeight * pIconDir->idEntries[i].bWidth) >= nMax)
|
||||
|
@ -694,7 +699,7 @@ static BOOL extract_icon32(LPCWSTR szFileName, int nIndex, char *szXPMFileName)
|
|||
nMax = pIconDir->idEntries[i].bHeight * pIconDir->idEntries[i].bWidth;
|
||||
nMaxBits = pIconDir->idEntries[i].wBitCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue