mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 04:37:15 +00:00
import EGA palette fix from Wine
svn path=/trunk/; revision=74191
This commit is contained in:
parent
a9d1e30a2a
commit
0c9274d5bf
1 changed files with 6 additions and 22 deletions
|
@ -11,27 +11,6 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#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 */
|
static const RGBQUAD DefLogPaletteQuads[20] = /* Copy of Default Logical Palette */
|
||||||
{
|
{
|
||||||
/* rgbBlue, rgbGreen, rgbRed, rgbReserved */
|
/* rgbBlue, rgbGreen, rgbRed, rgbReserved */
|
||||||
|
@ -883,7 +862,12 @@ GreGetDIBitsInternal(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
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;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
|
|
Loading…
Reference in a new issue