mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
Use the bitmap's palette, not the DC one's in NtGdiGetDIBitsInternal. Fixes Firefox colors going nots after 60 sec.
See issue #3854 for more details. svn path=/trunk/; revision=38511
This commit is contained in:
parent
fbd7681b84
commit
1fa9bb9b8e
1 changed files with 6 additions and 3 deletions
|
@ -622,7 +622,6 @@ NtGdiGetDIBitsInternal(HDC hDC,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Get handle for the palette in DC. */
|
||||
Dc = DC_LockDc(hDC);
|
||||
if (Dc == NULL) return 0;
|
||||
if (Dc->DC_Type == DC_TYPE_INFO)
|
||||
|
@ -630,8 +629,6 @@ NtGdiGetDIBitsInternal(HDC hDC,
|
|||
DC_UnlockDc(Dc);
|
||||
return 0;
|
||||
}
|
||||
/* Source palette obtained from the windows hdc */
|
||||
hSourcePalette = Dc->DcLevel.hpal;
|
||||
DC_UnlockDc(Dc);
|
||||
|
||||
/* Get a pointer to the source bitmap object */
|
||||
|
@ -639,6 +636,12 @@ NtGdiGetDIBitsInternal(HDC hDC,
|
|||
if (BitmapObj == NULL)
|
||||
return 0;
|
||||
|
||||
hSourcePalette = BitmapObj->hDIBPalette;
|
||||
if (!hSourcePalette)
|
||||
{
|
||||
hSourcePalette = pPrimarySurface->DevInfo.hpalDefault;
|
||||
}
|
||||
|
||||
ColorPtr = ((PBYTE)Info + Info->bmiHeader.biSize);
|
||||
rgbQuads = (RGBQUAD *)ColorPtr;
|
||||
|
||||
|
|
Loading…
Reference in a new issue