winemenubuilder: Improve icon generation.

This commit is contained in:
Damjan Jovanovic 2008-12-27 14:37:48 +02:00 committed by Alexandre Julliard
parent c50a368e46
commit 83b081f73c
1 changed files with 2 additions and 3 deletions

View File

@ -494,14 +494,13 @@ static BOOL extract_icon32(LPCWSTR szFileName, int nIndex, char *szXPMFileName)
{
for (i = 0; i < pIconDir->idCount; i++)
{
if ((pIconDir->idEntries[i].wBitCount >= nMaxBits) && (pIconDir->idEntries[i].wBitCount <= 8))
if (pIconDir->idEntries[i].wBitCount >= nMaxBits)
{
nMaxBits = pIconDir->idEntries[i].wBitCount;
if ((pIconDir->idEntries[i].bHeight * pIconDir->idEntries[i].bWidth) >= nMax)
{
lpName = MAKEINTRESOURCEW(pIconDir->idEntries[i].nID);
nMax = pIconDir->idEntries[i].bHeight * pIconDir->idEntries[i].bWidth;
nMaxBits = pIconDir->idEntries[i].wBitCount;
}
}
}