mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user