Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLPNf-0000Fz-RT for qemu-devel@nongnu.org; Tue, 22 Jul 2008 17:26:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLPNe-0000FG-FB for qemu-devel@nongnu.org; Tue, 22 Jul 2008 17:26:47 -0400 Received: from [199.232.76.173] (port=54531 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLPNe-0000FB-3d for qemu-devel@nongnu.org; Tue, 22 Jul 2008 17:26:46 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:59180) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KLPNd-0005c8-Vr for qemu-devel@nongnu.org; Tue, 22 Jul 2008 17:26:46 -0400 Message-Id: <1DCE177A-FDF8-4DFA-B0FE-AF85605439F0@web.de> From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: <1216759903-21779-1-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: [Qemu-devel] [PATCH 1/3] Fix SDL problems with BGR displays Date: Tue, 22 Jul 2008 23:25:50 +0200 References: <1216759903-21779-1-git-send-email-aliguori@us.ibm.com> Sender: andreas.faerber@web.de Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori Hi, Am 22.07.2008 um 22:51 schrieb Anthony Liguori: > From: Avi Kivity > > kvm: qemu: revert qemu's sdl.c rev 1.40 > > this fixes problems with bgr displays. What problems exactly are you fixing? Could other backends such as Cocoa be affected, too? > Signed-off-by: Avi Kivity > Signed-off-by: Anthony Liguori > > diff --git a/sdl.c b/sdl.c > index bac60ea..719e2bd 100644 > --- a/sdl.c > +++ b/sdl.c > @@ -89,7 +89,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; > Why does BGR depend on a depth of 32? Andreas