mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 12:23:25 +00:00
Adding small hack to getting SetPixel color right when it is more that 3 bytes long.
This hack allown us pass one more test. (Debuging in progress) svn path=/trunk/; revision=23904
This commit is contained in:
@@ -485,14 +485,16 @@ BITMAP_Cleanup(PVOID ObjectBody)
|
||||
{
|
||||
if (pBmp->dib == NULL)
|
||||
{
|
||||
ExFreePool(pBmp->SurfObj.pvBits);
|
||||
if (pBmp->SurfObj.pvBits != NULL)
|
||||
ExFreePool(pBmp->SurfObj.pvBits);
|
||||
}
|
||||
else
|
||||
{
|
||||
EngFreeUserMem(pBmp->SurfObj.pvBits);
|
||||
if (pBmp->SurfObj.pvBits != NULL)
|
||||
EngFreeUserMem(pBmp->SurfObj.pvBits);
|
||||
}
|
||||
if (pBmp->hDIBPalette)
|
||||
{
|
||||
if (pBmp->hDIBPalette != NULL)
|
||||
{
|
||||
NtGdiDeleteObject(pBmp->hDIBPalette);
|
||||
}
|
||||
}
|
||||
@@ -1066,11 +1068,27 @@ NtGdiSetPixel(
|
||||
INT Y,
|
||||
COLORREF Color)
|
||||
{
|
||||
|
||||
DPRINT1("0 NtGdiSetPixel X %ld Y %ld C %ld\n",X,Y,Color);
|
||||
|
||||
if (((Color>>24) & 0xff)<0x10)
|
||||
{
|
||||
Color = ((Color>>16) & 0x0000ff) | ((Color<<16) & 0xff0000) | (Color & 0x00ff00);
|
||||
}
|
||||
|
||||
DPRINT1("0 NtGdiSetPixel X %ld Y %ld C %ld\n",X,Y,Color);
|
||||
|
||||
if (NtGdiSetPixelV(hDC,X,Y,Color))
|
||||
{
|
||||
return NtGdiGetPixel(hDC,X,Y);
|
||||
Color = NtGdiGetPixel(hDC,X,Y);
|
||||
DPRINT1("1 NtGdiSetPixel X %ld Y %ld C %ld\n",X,Y,Color);
|
||||
return Color;
|
||||
|
||||
}
|
||||
return ((COLORREF) -1);
|
||||
|
||||
Color = ((COLORREF) -1);
|
||||
DPRINT1("2 NtGdiSetPixel X %ld Y %ld C %ld\n",X,Y,Color);
|
||||
return Color;
|
||||
}
|
||||
|
||||
BOOL STDCALL
|
||||
|
||||
Reference in New Issue
Block a user