aboutsummaryrefslogtreecommitdiff
path: root/sdl.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-08-23 18:03:34 +0200
committerAndrzej Zaborowski <balrog@zabor.org>2009-08-23 18:03:34 +0200
commit699960b2725f392ccc5070602edf67a7f314f552 (patch)
tree922a4a2b8bcecfdac3911527469de251d155562d /sdl.c
parentUse corect depth from DisplaySurface in vmware_vga.c (diff)
downloadqemu-kvm-699960b2725f392ccc5070602edf67a7f314f552.tar.gz
qemu-kvm-699960b2725f392ccc5070602edf67a7f314f552.tar.bz2
qemu-kvm-699960b2725f392ccc5070602edf67a7f314f552.zip
sdl.c: support 32 bpp cursors
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> Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com>
Diffstat (limited to 'sdl.c')
-rw-r--r--sdl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sdl.c b/sdl.c
index 36fb07f22..33edfb8dd 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;