mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[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:
parent
514147776a
commit
c7954134d0
1 changed files with 3 additions and 8 deletions
|
@ -730,7 +730,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;
|
||||||
|
|
||||||
|
@ -769,13 +769,8 @@ IntGdiRealizePalette(HDC hDC)
|
||||||
|
|
||||||
ASSERT(ppalDC->flFlags & PAL_INDEXED);
|
ASSERT(ppalDC->flFlags & PAL_INDEXED);
|
||||||
|
|
||||||
// FIXME: Should we resize ppalSurf if it's too small?
|
DPRINT1("RealizePalette unimplemented for %s\n",
|
||||||
realize = (ppalDC->NumColors < ppalSurf->NumColors) ? ppalDC->NumColors : ppalSurf->NumColors;
|
(pdc->dctype == DC_TYPE_MEMORY ? "memory managed DCs" : "device DCs"));
|
||||||
|
|
||||||
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