aboutsummaryrefslogtreecommitdiff
path: root/hw/display/ati_2d.c
diff options
context:
space:
mode:
authorBALATON Zoltan <balaton@eik.bme.hu>2019-07-03 12:56:50 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-07-05 09:50:33 +0200
commita38127414bd007c5b6ae64c664d9e8839393277e (patch)
tree36d75753f71f81a35d79d3d9e413ee1bc89f527d /hw/display/ati_2d.c
parentc799d2ee7e92433128ed9256a5fcc35f40f2f6c2 (diff)
ati-vga: Fix frame buffer endianness for big endian target
The extended mode frame buffer should be little endian even when emulating big endian machine (such as PPC). This fixes color problems with MorphOS. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Message-id: 439aa85061f103446df7b42632d730971a372432.1562151410.git.balaton@eik.bme.hu Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/ati_2d.c')
-rw-r--r--hw/display/ati_2d.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c
index c31142af6e..b09753320a 100644
--- a/hw/display/ati_2d.c
+++ b/hw/display/ati_2d.c
@@ -124,15 +124,15 @@ void ati_2d_blt(ATIVGAState *s)
switch (s->regs.dp_mix & GMC_ROP3_MASK) {
case ROP3_PATCOPY:
- filler = bswap32(s->regs.dp_brush_frgd_clr);
+ filler = s->regs.dp_brush_frgd_clr;
break;
case ROP3_BLACKNESS:
- filler = rgb_to_pixel32(s->vga.palette[0], s->vga.palette[1],
- s->vga.palette[2]) << 8 | 0xff;
+ filler = 0xffUL << 24 | rgb_to_pixel32(s->vga.palette[0],
+ s->vga.palette[1], s->vga.palette[2]);
break;
case ROP3_WHITENESS:
- filler = rgb_to_pixel32(s->vga.palette[3], s->vga.palette[4],
- s->vga.palette[5]) << 8 | 0xff;
+ filler = 0xffUL << 24 | rgb_to_pixel32(s->vga.palette[3],
+ s->vga.palette[4], s->vga.palette[5]);
break;
}