Author: sgasiorek Date: Sun Mar 19 00:35:48 2017 New Revision: 74191
URL: http://svn.reactos.org/svn/reactos?rev=74191&view=rev Log: import EGA palette fix from Wine
Modified: trunk/reactos/win32ss/gdi/ntgdi/dibobj.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/dibobj.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dibobj.c?... ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] Sun Mar 19 00:35:48 2017 @@ -10,27 +10,6 @@
#define NDEBUG #include <debug.h> - -static const RGBQUAD EGAColorsQuads[16] = -{ - /* rgbBlue, rgbGreen, rgbRed, rgbReserved */ - { 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x80, 0x00 }, - { 0x00, 0x80, 0x00, 0x00 }, - { 0x00, 0x80, 0x80, 0x00 }, - { 0x80, 0x00, 0x00, 0x00 }, - { 0x80, 0x00, 0x80, 0x00 }, - { 0x80, 0x80, 0x00, 0x00 }, - { 0x80, 0x80, 0x80, 0x00 }, - { 0xc0, 0xc0, 0xc0, 0x00 }, - { 0x00, 0x00, 0xff, 0x00 }, - { 0x00, 0xff, 0x00, 0x00 }, - { 0x00, 0xff, 0xff, 0x00 }, - { 0xff, 0x00, 0x00, 0x00 }, - { 0xff, 0x00, 0xff, 0x00 }, - { 0xff, 0xff, 0x00, 0x00 }, - { 0xff, 0xff, 0xff, 0x00 } -};
static const RGBQUAD DefLogPaletteQuads[20] = /* Copy of Default Logical Palette */ { @@ -883,7 +862,12 @@ break;
case 4: - RtlCopyMemory(rgbQuads, EGAColorsQuads, sizeof(EGAColorsQuads)); + /* The EGA palette is the first and last 8 colours of the default palette + with the innermost pair swapped */ + RtlCopyMemory(rgbQuads, DefLogPaletteQuads, 7 * sizeof(RGBQUAD)); + RtlCopyMemory(rgbQuads + 7, DefLogPaletteQuads + 12, 1 * sizeof(RGBQUAD)); + RtlCopyMemory(rgbQuads + 8, DefLogPaletteQuads + 7, 1 * sizeof(RGBQUAD)); + RtlCopyMemory(rgbQuads + 9, DefLogPaletteQuads + 13, 7 * sizeof(RGBQUAD)); break;
case 8: