gdi32: Set the mono color map in BitBlt also for the initial PutImage attempt.

This commit is contained in:
Alexandre Julliard 2011-11-04 13:24:03 +01:00
parent 278899d1e8
commit bfb41db3a2
1 changed files with 16 additions and 16 deletions

View File

@ -244,11 +244,6 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
release_dc_ptr( dc_src ); release_dc_ptr( dc_src );
if (err) return FALSE; if (err) return FALSE;
dst_dev = GET_DC_PHYSDEV( dc_dst, pPutImage );
copy_bitmapinfo( dst_info, src_info );
err = dst_dev->funcs->pPutImage( dst_dev, 0, 0, dst_info, &bits, src, dst, rop );
if (err == ERROR_BAD_FORMAT)
{
/* 1-bpp source without a color table uses the destination DC colors */ /* 1-bpp source without a color table uses the destination DC colors */
if (src_info->bmiHeader.biBitCount == 1 && !src_info->bmiHeader.biClrUsed) if (src_info->bmiHeader.biBitCount == 1 && !src_info->bmiHeader.biClrUsed)
{ {
@ -265,6 +260,11 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
src_info->bmiHeader.biClrUsed = 2; src_info->bmiHeader.biClrUsed = 2;
} }
dst_dev = GET_DC_PHYSDEV( dc_dst, pPutImage );
copy_bitmapinfo( dst_info, src_info );
err = dst_dev->funcs->pPutImage( dst_dev, 0, 0, dst_info, &bits, src, dst, rop );
if (err == ERROR_BAD_FORMAT)
{
/* 1-bpp destination without a color table requires a fake 1-entry table /* 1-bpp destination without a color table requires a fake 1-entry table
* that contains only the background color */ * that contains only the background color */
if (dst_info->bmiHeader.biBitCount == 1 && !dst_info->bmiHeader.biClrUsed) if (dst_info->bmiHeader.biBitCount == 1 && !dst_info->bmiHeader.biClrUsed)