SDL_Cursor *cursor; /* Make this variable visible in the point where you exit the program */ int32_t cursorData[2] = {0, 0}; cursor = SDL_CreateCursor((Uint8 *)cursorData, (Uint8 *)cursorData, 8, 8, 4, 4); SDL_SetCursor(cursor);