- Fix the red and blue color inversion 2.

This commit is contained in:
Regis Cosnier 2019-03-14 23:19:48 +01:00
parent e205a6c38a
commit fac5057e93

View file

@ -1583,9 +1583,9 @@ UINT SetDIBColorTable(HDC hdc, UINT iStart, UINT cEntries, CONST RGBQUAD *prgbq
&& hdc->realizedPalette->paletteLog->palNumEntries > 0 && iStart < hdc->realizedPalette->paletteLog->palNumEntries) { && hdc->realizedPalette->paletteLog->palNumEntries > 0 && iStart < hdc->realizedPalette->paletteLog->palNumEntries) {
PALETTEENTRY * palPalEntry = hdc->realizedPalette->paletteLog->palPalEntry; PALETTEENTRY * palPalEntry = hdc->realizedPalette->paletteLog->palPalEntry;
for (int i = iStart, j = 0; i < cEntries; i++, j++) { for (int i = iStart, j = 0; i < cEntries; i++, j++) {
palPalEntry[i].peRed = prgbq[j].rgbBlue; palPalEntry[i].peRed = prgbq[j].rgbRed;
palPalEntry[i].peGreen = prgbq[j].rgbGreen; palPalEntry[i].peGreen = prgbq[j].rgbGreen;
palPalEntry[i].peBlue = prgbq[j].rgbRed; palPalEntry[i].peBlue = prgbq[j].rgbBlue;
palPalEntry[i].peFlags = 0; palPalEntry[i].peFlags = 0;
} }
} }