From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Md4bI-0005jj-MD for qemu-devel@nongnu.org; Mon, 17 Aug 2009 11:58:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Md4bD-0005eN-Ts for qemu-devel@nongnu.org; Mon, 17 Aug 2009 11:58:23 -0400 Received: from [199.232.76.173] (port=46912 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Md4bD-0005e9-H3 for qemu-devel@nongnu.org; Mon, 17 Aug 2009 11:58:19 -0400 Received: from mail.gmx.net ([213.165.64.20]:37722) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Md4bC-0007pv-Rh for qemu-devel@nongnu.org; Mon, 17 Aug 2009 11:58:19 -0400 Date: Mon, 17 Aug 2009 17:58:14 +0200 From: Reimar =?iso-8859-1?Q?D=F6ffinger?= Message-ID: <20090817155814.GA1665@1und1.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] sdl.c: support 32 bpp cursors List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hello, currently when a 32 bpp cursor gets defined the result is all-black in the areas that are not transparent (you'll get a 32 bpp cursor if you use my previous patch to allow vmware_vga to use a 32 bpp framebuffer). This is because the switch in sdl.c lacks a 32 bpp case. The thing I am unsure about though is which byte is the unused one and should be skipped, the first or the last - for the black-and-white cursors I tested it doesn't make a difference... Signed-off-by: Reimar Döffinger --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="sdl_32bpp_cursor.diff" diff --git a/sdl.c b/sdl.c index 36fb07f..33edfb8 100644 --- a/sdl.c +++ b/sdl.c @@ -771,6 +771,9 @@ static void sdl_mouse_define(int width, int height, int bpp, line = image; for (x = 0; x < width; x ++, dst ++) { switch (bpp) { + case 32: + src = *(line ++); src |= *(line ++); src |= *(line ++); line++; + break; case 24: src = *(line ++); src |= *(line ++); src |= *(line ++); break; --G4iJoqBmSsgzjUCe--