[Bug 35375] Multiple applications need Vista+ API COMCTL32.dll.380 a.k.a. 'LoadIconMetric' (Solidworks 2013 systray monitor, Microsoft One/SkyDrive)
wine-bugs at winehq.org
wine-bugs at winehq.org
Wed Sep 30 09:26:54 CDT 2015
https://bugs.winehq.org/show_bug.cgi?id=35375
--- Comment #14 from Michael Müller <michael at fds-team.de> ---
There is another problem with this patch. The MSDN clearly mentions that
LoadIconMetric is supposed to downscale if possible:
> If an exact size match cannot be found and a larger icon is available, a new icon is created by scaling the larger version down to the desired size.
This is not the case for my implementation:
LoadImageW -> CURSORICON_Load -> CURSORICON_FindBestIconRes ->
CURSORICON_FindBestIcon:
----
for ( i = 0; iTotalDiff && get_entry( dir, size, i, &cx, &cy, &bits ); i++ )
{
iTempXDiff = abs(width - cx);
iTempYDiff = abs(height - cy);
if(iTotalDiff > (iTempXDiff + iTempYDiff))
{
iXDiff = iTempXDiff;
iYDiff = iTempYDiff;
iTotalDiff = iXDiff + iYDiff;
}
}
----
The current implementation uses the closest match instead of downscaling if
possible. This is the main reason why I didn't this patch so far, it will most
probably need further changes in the underlying functions to work correctly.
If the current approach is still suitable for the development branch, I can fix
the problem with LR_LOADFROMFILE and send it upstream.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list