From: "Reimar Döffinger" <Reimar.Doeffinger@gmx.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] sdl.c: support 32 bpp cursors
Date: Mon, 17 Aug 2009 17:58:14 +0200 [thread overview]
Message-ID: <20090817155814.GA1665@1und1.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
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 <Reimar.Doeffinger@gmx.de>
[-- Attachment #2: sdl_32bpp_cursor.diff --]
[-- Type: text/plain, Size: 507 bytes --]
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;
next reply other threads:[~2009-08-17 15:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 15:58 Reimar Döffinger [this message]
2009-08-17 16:48 ` [Qemu-devel] Re: [PATCH] sdl.c: support 32 bpp cursors Paolo Bonzini
2009-08-17 17:01 ` Reimar Döffinger
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=20090817155814.GA1665@1und1.de \
--to=reimar.doeffinger@gmx.de \
--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).