With SDL 2.0.10, when creating cursors with SDL_CreateCursor on Windows 7 64bit inverted colours do not seem to work correctly.
On https://wiki.libsdl.org/SDL_CreateCursor it states ‘inverted color if possible, black if not’ so technically I am getting the ‘if not’ behaviour. But this is undesirable and likely a bug?
So far in SDL’s code I have been looking at the function WIN_CreateCursor():
I suspect all cursor creation is going through it (I haven’t had time to set things up to build and debug the source yet). At a guess maybe this was a bug that crept in when ‘SDL_CreateColorCursor’ was added? Which doesn’t unfortunately support XOR coloured data.
By using the simple raw Win32 API cursor functions I can create cursors correctly with inverted colours. But then I end up in a ‘SetCursor’ fight with SDL to ensure my self created cursor with inverted colours doesn’t get swapped out. So I am debating what to do there as I do also want to support animated cursors, and full coloured XOR stuff eventually (but from what I am reading so far animating the cursor by repeated SetCursor calls seems like it’s maybe fine).