Fixed one more bug, we did create wrong bpp if we got HDC = NULL for CreateDIBitmap, when I read wine code

it is always 1Bpp and 1Plans and we are doing same now if HDC is NULL, some wine test deepness on it. 
Hopply it will take care of some program problem. 

svn path=/trunk/; revision=23899
This commit is contained in:
Magnus Olsen 2006-09-03 18:16:08 +00:00
parent c6f105da0b
commit 7fe1969532

View file

@ -795,7 +795,8 @@ HBITMAP STDCALL NtGdiCreateDIBitmap(HDC hDc, const BITMAPINFOHEADER *Header,
if (NULL == hDc)
{
{
BITMAPINFOHEADER *change_Header = (BITMAPINFOHEADER *)Header;
hDc = IntGdiCreateDC(NULL, NULL, NULL, NULL,FALSE);
if (hDc == NULL)
{
@ -810,6 +811,9 @@ HBITMAP STDCALL NtGdiCreateDIBitmap(HDC hDc, const BITMAPINFOHEADER *Header,
return NULL;
}
change_Header->biBitCount = 1;
change_Header->biPlanes = 1;
Bmp = IntCreateDIBitmap(Dc, Header, Init, Bits, Data, ColorUse);
DC_UnlockDc(Dc);
NtGdiDeleteObjectApp(hDc);