qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] sdl.c: support 32 bpp cursors
@ 2009-08-17 15:58 Reimar Döffinger
  2009-08-17 16:48 ` [Qemu-devel] " Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Reimar Döffinger @ 2009-08-17 15:58 UTC (permalink / raw)
  To: qemu-devel

[-- 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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-17 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-17 15:58 [Qemu-devel] [PATCH] sdl.c: support 32 bpp cursors Reimar Döffinger
2009-08-17 16:48 ` [Qemu-devel] " Paolo Bonzini
2009-08-17 17:01   ` Reimar Döffinger

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).