Re: vga color

Avi Kivity
2007-10-08T09:52:43Z

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

Zhao, Yunfeng wrote:
> All our machines for KVM testing have the problem.
> I attached the output of "xdpyinfo" on one of them.
>
>

Please try the attached patch.

--
Any sufficiently difficult bug is indistinguishable from a feature.

[-- Attachment #2: bgr.patch --]
[-- Type: text/x-patch, Size: 465 bytes --]

diff --git a/qemu/sdl.c b/qemu/sdl.c
index 02500c9..3f3b719 100644
--- a/qemu/sdl.c
+++ b/qemu/sdl.c
@@ -87,7 +87,7 @@ static void sdl_resize(DisplayState *ds, int w, int h)
ds->data = screen->pixels;
ds->linesize = screen->pitch;
ds->depth = screen->format->BitsPerPixel;
- if (screen->format->Bshift > screen->format->Rshift) {
+ if (ds->depth == 32 && screen->format->Rshift == 0) {
ds->bgr = 1;
} else {
ds->bgr = 0;