Commit e72a37e9 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemenubuilder: On Mac, size is implicit in ICNS slot; don't search for best.

parent eb409390
......@@ -839,7 +839,6 @@ static HRESULT platform_write_icon(IStream *icoStream, int exeIndex, LPCWSTR ico
int numEntries;
struct {
int index;
int maxPixels;
int maxBits;
} best[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++)
{
best[i].index = -1;
best[i].maxPixels = 0;
best[i].maxBits = 0;
}
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);
if (slot < 0)
continue;
if (iconDirEntries[i].wBitCount >= best[slot].maxBits &&
(height * width) >= best[slot].maxPixels)
if (iconDirEntries[i].wBitCount >= best[slot].maxBits)
{
best[slot].index = i;
best[slot].maxPixels = height * width;
best[slot].maxBits = iconDirEntries[i].wBitCount;
}
}
......
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