[WIN32K] Revert incorrect part of R50928 for RealizePalette. (#3678)

Revert incorrect code for Realize Palette
Revert part of SVN R50928 that causes Durak card suites to have wrong colors.
SVN r50928 == git 5de8339cd1

JIRA issue: CORE-13748 <= Durak Example
JIRA issue: CORE-16510 <= GDIProg Example

The patch also fixes 2 crashes on each bot, although
it was not targeted for that explicitly:
KVM: https://reactos.org/testman/compare.php?ids=77304,77308 LGTM
VBox: https://reactos.org/testman/compare.php?ids=77305,77309 LGTM
This commit is contained in:
Doug Lyons 2021-06-19 11:25:03 -05:00 committed by GitHub
parent 514147776a
commit c7954134d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -730,7 +730,7 @@ UINT
FASTCALL
IntGdiRealizePalette(HDC hDC)
{
UINT i, realize = 0;
UINT realize = 0;
PDC pdc;
PALETTE *ppalSurf, *ppalDC;
@ -769,13 +769,8 @@ IntGdiRealizePalette(HDC hDC)
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]);
}
DPRINT1("RealizePalette unimplemented for %s\n",
(pdc->dctype == DC_TYPE_MEMORY ? "memory managed DCs" : "device DCs"));
cleanup:
DC_UnlockDc(pdc);