From 19fcfe178bb5f9f6b9604a4c4e138825149e83b8 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 25 Sep 2003 15:15:03 +0000 Subject: [PATCH] Slightly changed PALETTE_SetMapping() to obtain pointer to the system palette dynamically instead of just looking into COLOR_sysPal. Good news - palbitblt.exe now works as it as supposed to work under non-paletted mode, and in 16-colors too (but I haven't checked if it looks the same in this mode in Windows too) svn path=/trunk/; revision=6132 --- reactos/subsys/win32k/objects/palette.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/reactos/subsys/win32k/objects/palette.c b/reactos/subsys/win32k/objects/palette.c index 3de952e2917..d68430b634d 100644 --- a/reactos/subsys/win32k/objects/palette.c +++ b/reactos/subsys/win32k/objects/palette.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: palette.c,v 1.12 2003/08/31 07:56:24 gvg Exp $ */ +/* $Id: palette.c,v 1.13 2003/09/25 15:15:03 fireball Exp $ */ #undef WIN32_LEAN_AND_MEAN #include @@ -184,6 +184,12 @@ INT STDCALL PALETTE_SetMapping(PPALOBJ palPtr, UINT uStart, UINT uNum, BOOL mapO int prevMapping = (palPtr->mapping) ? 1 : 0; int index, iRemapped = 0; int *mapping; + HPALETTE hSysPal = NtGdiGetStockObject(DEFAULT_PALETTE); + PPALOBJ pSysPal = (PPALOBJ)PALETTE_LockPalette(hSysPal); + + COLOR_sysPal = pSysPal->logpalette->palPalEntry; + PALETTE_UnlockPalette(hSysPal); // FIXME: Is this a right way to obtain pointer to the system palette? + // reset dynamic system palette entries