winemenubuilder: On Mac, size is implicit in ICNS slot; don't search for best.
This commit is contained in:
parent
eb40939092
commit
e72a37e960
|
@ -839,7 +839,6 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico
|
||||||
int numEntries;
|
int numEntries;
|
||||||
struct {
|
struct {
|
||||||
int index;
|
int index;
|
||||||
int maxPixels;
|
|
||||||
int maxBits;
|
int maxBits;
|
||||||
} best[ICNS_SLOTS];
|
} best[ICNS_SLOTS];
|
||||||
int indexes[ICNS_SLOTS];
|
int indexes[ICNS_SLOTS];
|
||||||
|
@ -857,7 +856,6 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico
|
||||||
for (i = 0; i < ICNS_SLOTS; i++)
|
for (i = 0; i < ICNS_SLOTS; i++)
|
||||||
{
|
{
|
||||||
best[i].index = -1;
|
best[i].index = -1;
|
||||||
best[i].maxPixels = 0;
|
|
||||||
best[i].maxBits = 0;
|
best[i].maxBits = 0;
|
||||||
}
|
}
|
||||||
for (i = 0; i < numEntries; i++)
|
for (i = 0; i < numEntries; i++)
|
||||||
|
@ -872,11 +870,9 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico
|
||||||
slot = size_to_slot(width);
|
slot = size_to_slot(width);
|
||||||
if (slot < 0)
|
if (slot < 0)
|
||||||
continue;
|
continue;
|
||||||
if (iconDirEntries[i].wBitCount >= best[slot].maxBits &&
|
if (iconDirEntries[i].wBitCount >= best[slot].maxBits)
|
||||||
(height * width) >= best[slot].maxPixels)
|
|
||||||
{
|
{
|
||||||
best[slot].index = i;
|
best[slot].index = i;
|
||||||
best[slot].maxPixels = height * width;
|
|
||||||
best[slot].maxBits = iconDirEntries[i].wBitCount;
|
best[slot].maxBits = iconDirEntries[i].wBitCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue