More monochrome icon handling fixes in CreateIcon and CreateCursorIconHandle, fixes two cursoricon winetests

svn path=/trunk/; revision=40530
This commit is contained in:
Gregor Schneider 2009-04-15 16:00:22 +00:00
parent 9f8ebd6a63
commit 1c62287842
2 changed files with 6 additions and 1 deletions

View file

@ -197,6 +197,11 @@ CreateIcon(
IconInfo.fIcon = TRUE;
IconInfo.xHotspot = nWidth / 2;
IconInfo.yHotspot = nHeight / 2;
if (cBitsPixel == 1)
{
nHeight <<= 1;
}
IconInfo.hbmMask = CreateBitmap(nWidth, nHeight, 1, 1, ANDbits);
if(!IconInfo.hbmMask)
{

View file

@ -561,7 +561,7 @@ NtUserCreateCursorIconHandle(PICONINFO IconInfo OPTIONAL, BOOL Indirect)
if (CurIcon->IconInfo.hbmColor == NULL)
{
CurIcon->Size.cx = psurfBmp->SurfObj.sizlBitmap.cx;
CurIcon->Size.cy = psurfBmp->SurfObj.sizlBitmap.cy;
CurIcon->Size.cy = psurfBmp->SurfObj.sizlBitmap.cy >> 1;
}
SURFACE_UnlockSurface(psurfBmp);
GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmMask, NULL);