diff --git a/win32ss/gdi/ntgdi/palette.c b/win32ss/gdi/ntgdi/palette.c index 265b691164..0ccbc5d7d5 100644 --- a/win32ss/gdi/ntgdi/palette.c +++ b/win32ss/gdi/ntgdi/palette.c @@ -965,6 +965,8 @@ IntSetPaletteEntries( { PPALETTE palGDI; ULONG numEntries; + INT i; + BYTE tmp; if ((UINT_PTR)hpal & GDI_HANDLE_STOCK_MASK) { @@ -985,6 +987,20 @@ IntSetPaletteEntries( Entries = numEntries - Start; } memcpy(palGDI->IndexedColors + Start, pe, Entries * sizeof(PALETTEENTRY)); + + i = 0; + do + { + tmp = palGDI->IndexedColors[i].peBlue; + palGDI->IndexedColors[i].peBlue = palGDI->IndexedColors[i].peRed; + palGDI->IndexedColors[i].peRed = tmp; + DPRINT("In Color Entry '%03d' is '%08x' and red/blue is '%03d/%03d.\n", i, pe[i], pe[i].peRed, pe[i].peBlue); + DPRINT("Out Color Entry '%03d' is '%08x' and red/blue is '%03d/%03d.\n", i, palGDI->IndexedColors[i], + palGDI->IndexedColors[i].peRed, palGDI->IndexedColors[i].peBlue); + ++i; + } + while (i < Entries); + PALETTE_ShareUnlockPalette(palGDI); return Entries;