[USER] Fix previous icon patch
Christian Costa
titan.costa at wanadoo.fr
Tue Nov 8 16:20:45 CST 2005
Hi,
This fixes my previous patch that was causing bad dispay of icons in
eMule as reported by Michael Jung.
Changelog:
If a color bitmap is provided, store bitmap information from it instead
of the mask bitmap one.
Christian Costa titan.costa at wanadoo.fr
-------------- next part --------------
Index: dlls/user/cursoricon.c
===================================================================
RCS file: /home/wine/wine/dlls/user/cursoricon.c,v
retrieving revision 1.18
diff -u -r1.18 cursoricon.c
--- dlls/user/cursoricon.c 7 Nov 2005 11:07:43 -0000 1.18
+++ dlls/user/cursoricon.c 8 Nov 2005 21:04:39 -0000
@@ -1824,20 +1824,31 @@
/* 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 */
More information about the wine-patches
mailing list