mirror of
https://github.com/reactos/reactos.git
synced 2024-07-06 12:45:16 +00:00
[0.4.7][WIN32K] Revert incorrect part of R50928 for RealizePalette. (#3678)
Revert part of SVN R50928 that causes Durak card suites to have wrong colors. SVN r50928 == git5de8339cd1
JIRA issue: CORE-13748 <= Durak Example JIRA issue: CORE-16510 <= GDIProg Example The idea was picked from 0.4.15-dev-2735-gc7954134d0
but I was too shy to port the recurrently spamming and slowing DPRINT1 back that far. Spamming on master should be enough to improve here later.
This commit is contained in:
parent
795c5cc31e
commit
7f018efb51
|
@ -727,7 +727,7 @@ UINT
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IntGdiRealizePalette(HDC hDC)
|
IntGdiRealizePalette(HDC hDC)
|
||||||
{
|
{
|
||||||
UINT i, realize = 0;
|
UINT realize = 0;
|
||||||
PDC pdc;
|
PDC pdc;
|
||||||
PALETTE *ppalSurf, *ppalDC;
|
PALETTE *ppalSurf, *ppalDC;
|
||||||
|
|
||||||
|
@ -766,13 +766,6 @@ IntGdiRealizePalette(HDC hDC)
|
||||||
|
|
||||||
ASSERT(ppalDC->flFlags & PAL_INDEXED);
|
ASSERT(ppalDC->flFlags & PAL_INDEXED);
|
||||||
|
|
||||||
// FIXME: Should we resize ppalSurf if it's too small?
|
|
||||||
realize = (ppalDC->NumColors < ppalSurf->NumColors) ? ppalDC->NumColors : ppalSurf->NumColors;
|
|
||||||
|
|
||||||
for (i=0; i<realize; i++)
|
|
||||||
{
|
|
||||||
InterlockedExchange((LONG*)&ppalSurf->IndexedColors[i], *(LONG*)&ppalDC->IndexedColors[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
DC_UnlockDc(pdc);
|
DC_UnlockDc(pdc);
|
||||||
|
|
Loading…
Reference in a new issue