Make sure we update dc->bitsPerPixel.

This commit is contained in:
Huw Davies 2003-06-23 20:52:22 +00:00 committed by Alexandre Julliard
parent 280528a07e
commit a3c10cf1e0
1 changed files with 3 additions and 1 deletions

View File

@ -312,6 +312,8 @@ BOOL PSDRV_CreateDC( DC *dc, PSDRV_PDEVICE **pdev, LPCSTR driver, LPCSTR device,
PSDRV_UpdateDevCaps(physDev);
dc->hFont = PSDRV_DefaultFont;
if (GetObjectType(dc->hSelf) != OBJ_MEMDC)
dc->bitsPerPixel = physDev->pi->ppd->ColorDevice ? 8 : 1;
return TRUE;
}
@ -367,7 +369,7 @@ INT PSDRV_GetDeviceCaps( PSDRV_PDEVICE *physDev, INT cap )
case VERTRES:
return physDev->vertRes;
case BITSPIXEL:
return (physDev->pi->ppd->ColorDevice ? 8 : 1);
return physDev->pi->ppd->ColorDevice ? 8 : 1;
case PLANES:
return 1;
case NUMBRUSHES: