sm501: Adjust endianness of pixel value in rectangle fill
The value from twoD_foreground (which is in host endian format) must be converted to the endianness of the framebuffer (currently always little endian) before it can be used to perform the fill operation. Signed-off-by: Marcus Comstedt <marcus@mc.pp.se> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
0976efd51b
commit
f3a60058c9
@ -39,6 +39,7 @@
|
|||||||
#include "hw/i2c/i2c-ddc.h"
|
#include "hw/i2c/i2c-ddc.h"
|
||||||
#include "qemu/range.h"
|
#include "qemu/range.h"
|
||||||
#include "ui/pixel_ops.h"
|
#include "ui/pixel_ops.h"
|
||||||
|
#include "qemu/bswap.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Status: 2010/05/07
|
* Status: 2010/05/07
|
||||||
@ -812,9 +813,11 @@ static void sm501_2d_operation(SM501State *s)
|
|||||||
FILL_RECT(1, uint8_t);
|
FILL_RECT(1, uint8_t);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
color = cpu_to_le16(color);
|
||||||
FILL_RECT(2, uint16_t);
|
FILL_RECT(2, uint16_t);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
color = cpu_to_le32(color);
|
||||||
FILL_RECT(4, uint32_t);
|
FILL_RECT(4, uint32_t);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user