From 55d247ef13656eb703dfb943f309adb8c5b37f74 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 11 Jul 2017 21:22:54 +0200 Subject: [PATCH] user32: Match cursor size in priority over color depth. Signed-off-by: Alexandre Julliard --- dlls/user32/cursoricon.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 4b2d6bd272a..f408c22909b 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -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; -- 2.11.4.GIT