I can't get colour inversion to work when using SDL_CreateCursor on Windows 11. This sample gives a fully white cursor rather than a transparent cursor. Is this a bug or is the code wrong?
#include <SDL3/SDL.h>
int main() {
SDL_Init(0);
SDL_Window* window = SDL_CreateWindow("", 500, 500, 0);
SDL_ShowWindow(window);
Uint8 data[8];
Uint8 mask[8];
memset(data, 0xFF, sizeof(data));
memset(mask, 0x0, sizeof(mask));
SDL_Cursor* cursor = SDL_CreateCursor(data, mask, 8, 8, 0, 0);
SDL_SetCursor(cursor);
while(true) {
SDL_Event event;
SDL_PollEvent(&event);
if(event.type == SDL_EVENT_QUIT) break;
}
SDL_Quit();
}