Alexandre Julliard : user32: Match cursor size in priority over color depth.
Alexandre Julliard
julliard at winehq.org
Tue Jul 11 15:59:32 CDT 2017
Module: wine
Branch: master
Commit: 55d247ef13656eb703dfb943f309adb8c5b37f74
URL: http://source.winehq.org/git/wine.git/?a=commit;h=55d247ef13656eb703dfb943f309adb8c5b37f74
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jul 11 21:22:54 2017 +0200
user32: Match cursor size in priority over color depth.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 4b2d6bd..f408c22 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;
More information about the wine-cvs
mailing list