Minor fixes

svn path=/trunk/; revision=3527
This commit is contained in:
Jason Filby 2002-09-21 10:39:54 +00:00
parent 2f3e32bfea
commit 93dd94f0db
2 changed files with 31 additions and 19 deletions

View file

@ -128,6 +128,14 @@ EngBitBlt(SURFOBJ *Dest,
} }
} }
/* The code currently assumes there will be a source bitmap. This is not true when, for example, using this function to
* paint a brush pattern on the destination. */
if(!Source)
{
DbgPrint("EngBitBlt: A source is currently required, even though not all operations require one (FIXME)\n");
return FALSE;
}
// * The source bitmap is not managed by the GDI and we didn't already obtain it using EngCopyBits from the device // * The source bitmap is not managed by the GDI and we didn't already obtain it using EngCopyBits from the device
if(Source->iType != STYPE_BITMAP && SourceGDI->CopyBits == NULL) if(Source->iType != STYPE_BITMAP && SourceGDI->CopyBits == NULL)
{ {

View file

@ -134,8 +134,11 @@ W32kRectangle(HDC hDC,
RectBounds, // Bounding rectangle RectBounds, // Bounding rectangle
dc->w.ROPmode); // MIX */ dc->w.ROPmode); // MIX */
// FIXME: BrushObj is obtained above; decide which one is correct
BrushObj = (BRUSHOBJ*) GDIOBJ_LockObj(dc->w.hBrush, GO_BRUSH_MAGIC); BrushObj = (BRUSHOBJ*) GDIOBJ_LockObj(dc->w.hBrush, GO_BRUSH_MAGIC);
assert(BrushObj);
if (BrushObj)
{
if (BrushObj->logbrush.lbStyle != BS_NULL) if (BrushObj->logbrush.lbStyle != BS_NULL)
{ {
DestRect.left = LeftRect + 1; DestRect.left = LeftRect + 1;
@ -154,6 +157,7 @@ W32kRectangle(HDC hDC,
NULL, NULL,
PATCOPY); PATCOPY);
} }
}
GDIOBJ_UnlockObj( dc->w.hBrush, GO_PEN_MAGIC ); GDIOBJ_UnlockObj( dc->w.hBrush, GO_PEN_MAGIC );
} }