From 24a3ae0601af22752c679797daae82b46b31a75e Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Wed, 9 Nov 2005 10:57:57 +0000 Subject: [PATCH] If a color bitmap is provided, store bitmap information from it instead of the mask bitmap one. --- dlls/user/cursoricon.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/dlls/user/cursoricon.c b/dlls/user/cursoricon.c index 19704451338..310032caab6 100644 --- a/dlls/user/cursoricon.c +++ b/dlls/user/cursoricon.c @@ -1831,20 +1831,31 @@ HICON WINAPI CreateIconIndirect(PICONINFO iconinfo) /* If we are creating an icon, the hotspot is unused */ if (iconinfo->fIcon) { - info->ptHotSpot.x = ICON_HOTSPOT; - info->ptHotSpot.y = ICON_HOTSPOT; + info->ptHotSpot.x = ICON_HOTSPOT; + info->ptHotSpot.y = ICON_HOTSPOT; } else { - info->ptHotSpot.x = iconinfo->xHotspot; - info->ptHotSpot.y = iconinfo->yHotspot; + info->ptHotSpot.x = iconinfo->xHotspot; + info->ptHotSpot.y = iconinfo->yHotspot; } - info->nWidth = bmpAnd.bmWidth; - info->nHeight = iconinfo->hbmColor ? bmpAnd.bmHeight : (bmpAnd.bmHeight / 2); - info->nWidthBytes = bmpAnd.bmWidthBytes; - info->bPlanes = bmpAnd.bmPlanes; - info->bBitsPerPixel = bmpAnd.bmBitsPixel; + if (iconinfo->hbmColor) + { + info->nWidth = bmpXor.bmWidth; + info->nHeight = bmpXor.bmHeight; + info->nWidthBytes = bmpXor.bmWidthBytes; + info->bPlanes = bmpXor.bmPlanes; + info->bBitsPerPixel = bmpXor.bmBitsPixel; + } + else + { + info->nWidth = bmpAnd.bmWidth; + info->nHeight = bmpAnd.bmHeight / 2; + info->nWidthBytes = bmpAnd.bmWidthBytes; + info->bPlanes = bmpAnd.bmPlanes; + info->bBitsPerPixel = bmpAnd.bmBitsPixel; + } /* Transfer the bitmap bits to the CURSORICONINFO structure */ -- 2.11.4.GIT