提交 699960b2 编写于 作者: R Reimar Döffinger 提交者: Andrzej Zaborowski

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: NReimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: NAndrzej Zaborowski <balrogg@gmail.com>
上级 c00a9de0
...@@ -771,6 +771,9 @@ static void sdl_mouse_define(int width, int height, int bpp, ...@@ -771,6 +771,9 @@ static void sdl_mouse_define(int width, int height, int bpp,
line = image; line = image;
for (x = 0; x < width; x ++, dst ++) { for (x = 0; x < width; x ++, dst ++) {
switch (bpp) { switch (bpp) {
case 32:
src = *(line ++); src |= *(line ++); src |= *(line ++); line++;
break;
case 24: case 24:
src = *(line ++); src |= *(line ++); src |= *(line ++); src = *(line ++); src |= *(line ++); src |= *(line ++);
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册