| Summary: | Using a transparent cursor shows as black on Windows | ||
|---|---|---|---|
| Product: | SDL | Reporter: | buckyballreaction |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P1 | CC: | g.manu, icculus |
| Version: | HG 2.0 | Keywords: | target-2.0.0 |
| Hardware: | x86 | ||
| OS: | Windows (All) | ||
| Attachments: |
sample code
Complete C version of test case. |
||
I forgot to add: If I make even one pixel black, the rest of the cursor works as transparent. Also, I am using hg 6bb657898f55 Thanks! This issue is still with the latest revision (53df899db00b). I used Windows XP SP3 32bit to compile and test a transparent cursor. It stills shows up as all-black. I do not actually use a transparent cursor anymore. I used to use it for disabling the cursor when SDL_ShowCursor(0) was a bit buggy... *** Bug 1488 has been marked as a duplicate of this bug. *** Bug #1488 is a duplicate of this, but has some good information in the comments. Reminder to check there too before fixing this. --ryan. (Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.) Tagging a bunch of bugs as target-2.0.0, Priority 1. This means we're in the final stretch for an official SDL 2.0.0 release! These are the bugs we really want to fix before shipping if humanly possible. That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.0 release, and generally be organized about what we're aiming to ship. Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment. Thanks! --ryan. Taking this to research. Will throw back to Sam if I get stuck. --ryan. Created attachment 1244 [details]
Complete C version of test case.
Attaching C version of C++ reproduction case, complete with a main(), etc.
--ryan.
Turns out CreateBitmap(..., NULL) leaves you with an uninitialized cursor mask. Don't know why setting one pixel in the cursor fixed this.
Explicitly setting the mask fixes the issue, which is now done here:
http://hg.libsdl.org/SDL/rev/30ec6dae748b
(This didn't happen in SDL 1.2 because we used a different API before we supported color mouse cursors.)
Resolving this bug.
--ryan.
Thanks! D |
Created attachment 841 [details] sample code Using a completely transparent SDL_Cursor shows as black on Windows. The attached sample code (c++) works well to create a transparent cursor for SDL 1.2, as well as 2.0 on Mac and Linux.