user32: Match cursor size in priority over color depth.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2017-07-11 21:22:54 +02:00
parent 06b90fe09d
commit 55d247ef13
1 changed files with 12 additions and 6 deletions

View File

@ -580,11 +580,14 @@ static int CURSORICON_FindBestCursor( LPCVOID dir, DWORD size, fnGetCIEntry get_
{
if (cx > width || cy > height) continue;
if (cx < maxwidth || cy < maxheight) continue;
if (loadflags & LR_MONOCHROME)
if (cx == maxwidth && cy == maxheight)
{
if (maxbits && bits >= maxbits) continue;
if (loadflags & LR_MONOCHROME)
{
if (maxbits && bits >= maxbits) continue;
}
else if (bits <= maxbits) continue;
}
else if (bits <= maxbits) continue;
bestEntry = i;
maxwidth = cx;
maxheight = cy;
@ -598,11 +601,14 @@ static int CURSORICON_FindBestCursor( LPCVOID dir, DWORD size, fnGetCIEntry get_
for ( i = 0; get_entry( dir, size, i, &cx, &cy, &bits ); i++ )
{
if (cx > maxwidth || cy > maxheight) continue;
if (loadflags & LR_MONOCHROME)
if (cx == maxwidth && cy == maxheight)
{
if (maxbits && bits >= maxbits) continue;
if (loadflags & LR_MONOCHROME)
{
if (maxbits && bits >= maxbits) continue;
}
else if (bits <= maxbits) continue;
}
else if (bits <= maxbits) continue;
bestEntry = i;
maxwidth = cx;
maxheight = cy;