wine/dlls/user cursoricon.c

Alexandre Julliard julliard at wine.codeweavers.com
Wed Nov 9 04:57:57 CST 2005


ChangeSet ID:	21188
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/09 04:57:57

Modified files:
	dlls/user      : cursoricon.c 

Log message:
	Christian Costa <titan.costa at wanadoo.fr>
	If a color bitmap is provided, store bitmap information from it
	instead of the mask bitmap one.

Patch: http://cvs.winehq.org/patch.py?id=21188

Old revision  New revision  Changes     Path
 1.19          1.20          +20 -9      wine/dlls/user/cursoricon.c

Index: wine/dlls/user/cursoricon.c
diff -u -p wine/dlls/user/cursoricon.c:1.19 wine/dlls/user/cursoricon.c:1.20
--- wine/dlls/user/cursoricon.c:1.19	9 Nov 2005 10:57:57 -0000
+++ wine/dlls/user/cursoricon.c	9 Nov 2005 10:57:57 -0000
@@ -1831,20 +1831,31 @@ HICON WINAPI CreateIconIndirect(PICONINF
         /* 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-cvs mailing list