From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: [PATCH] Fix color problems with sdl on bgr displays Date: Sun, 14 Oct 2007 15:52:15 +0200 Message-ID: <47121F0F.9020804@qumranet.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080904000708000609050406" Cc: kvm-devel To: qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --------------080904000708000609050406 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Some kvm users complained that the blue and red channels are flipped on their displays. Reverting sdl.c rev 1.40 fixed that problem, so apparently that commit made the problem larger than it was previously. Attached a patch the removes the commit and fixes the problem. Please apply. -- error compiling committee.c: too many arguments to function --------------080904000708000609050406 Content-Type: text/x-patch; name="sdl-bgr.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sdl-bgr.patch" Index: sdl.c =================================================================== RCS file: /sources/qemu/qemu/sdl.c,v retrieving revision 1.44 diff -u -r1.44 sdl.c --- sdl.c 17 Sep 2007 08:09:45 -0000 1.44 +++ sdl.c 14 Oct 2007 13:49:37 -0000 @@ -87,7 +87,7 @@ 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; --------------080904000708000609050406 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --------------080904000708000609050406 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --------------080904000708000609050406--