From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [6336] DisplayState interface change (Stefano Stabellini)
Date: Thu, 22 Jan 2009 01:03:22 +0300 (MSK) [thread overview]
Message-ID: <Pine.LNX.4.64.0901220055470.6362@linmac.oyster.ru> (raw)
In-Reply-To: <497795DD.5060008@eu.citrix.com>
On Wed, 21 Jan 2009, Stefano Stabellini wrote:
> malc wrote:
>
>>
>> This breaks truecolor display for both sdl and vnc on big-endian
>> hosts.
>>
>
>
> I hope that "breaks" in this case means "the colors are wrong".
Yes.
>
> I think I just need to change console.c:qemu_default_pixelformat to
> correctly handle big-endian hosts, the fix should be simple but it will
> be really difficult for me to test.
If it will help any, following brings the colors back to normal for vnc:
diff --git a/vnc.c b/vnc.c
index 17ea9a2..2096a7a 100644
--- a/vnc.c
+++ b/vnc.c
@@ -1283,7 +1283,7 @@ static void set_pixel_format(VncState *vs,
vs->clientds.pf.bits_per_pixel = bits_per_pixel;
vs->clientds.pf.bytes_per_pixel = bits_per_pixel / 8;
vs->clientds.pf.depth = bits_per_pixel == 32 ? 24 : bits_per_pixel;
- vs->clientds.flags = big_endian_flag ? QEMU_BIG_ENDIAN_FLAG : 0x00;
+ vs->clientds.flags = 0;
set_pixel_conversion(vs);
P.S. In console.c you have this:
if (surface->flags & QEMU_ALLOCATED_FLAG)
surface->data = (uint8_t*) qemu_realloc(surface->data, surface->linesize * surface->height);
else
surface->data = (uint8_t*) qemu_malloc(surface->linesize * surface->height);
Why? Have reservations that qemu_realloc might break the realloc contract
(of being the same as malloc in case of NULL ptr)? Also the casts are unnecessary.
--
mailto:av1474@comtv.ru
prev parent reply other threads:[~2009-01-21 22:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-15 22:14 [Qemu-devel] [6336] DisplayState interface change (Stefano Stabellini) Anthony Liguori
[not found] ` <8C51AFDA-0E6D-4E98-A11E-14A4C608B325@hotmail.com>
2009-01-16 6:00 ` C.W. Betts
2009-01-16 11:30 ` Stefano Stabellini
2009-01-16 14:30 ` Anthony Liguori
2009-01-16 14:46 ` Stefano Stabellini
[not found] ` <194BD282-0D89-4ACA-83DD-EB41612C1EA3@hotmail.com>
2009-01-17 5:58 ` C.W. Betts
2009-01-21 20:48 ` malc
2009-01-21 21:38 ` Stefano Stabellini
2009-01-21 22:03 ` malc [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0901220055470.6362@linmac.oyster.ru \
--to=av1474@comtv.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).