https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c7954134d0d60100911b8…
commit c7954134d0d60100911b8872d3605fbb576d968d
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Sat Jun 19 11:25:03 2021 -0500
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Jun 19 18:25:03 2021 +0200
[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 5de8339cd196e2bc01ac631e677010a939b2d083
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
---
win32ss/gdi/ntgdi/palette.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/win32ss/gdi/ntgdi/palette.c b/win32ss/gdi/ntgdi/palette.c
index ec92c287219..31cd4f5f3fd 100644
--- a/win32ss/gdi/ntgdi/palette.c
+++ b/win32ss/gdi/ntgdi/palette.c
@@ -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);