mirror of
https://github.com/reactos/reactos.git
synced 2024-09-08 19:59:49 +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:
parent
9fbb616938
commit
09a8680165
|
@ -485,13 +485,15 @@ BITMAP_Cleanup(PVOID ObjectBody)
|
|||
{
|
||||
if (pBmp->dib == NULL)
|
||||
{
|
||||
if (pBmp->SurfObj.pvBits != NULL)
|
||||
ExFreePool(pBmp->SurfObj.pvBits);
|
||||
}
|
||||
else
|
||||
{
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue