| Summary: | Add a function for getting the default cursor | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alex Szpakowski <amaranth72> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | jorgen |
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Patch to add SDL_GetDefaultCursor to SDL_mouse | ||
Created attachment 1108 [details] Patch to add SDL_GetDefaultCursor to SDL_mouse Currently there is no way to get the default mouse cursor, even though it's always stored internally. There is often reason for switching back to the default after using a custom cursor for a short time, and while it's possible to manually save the default cursor by calling SDL_GetCursor() before any SDL_SetCursor is called, it's not particularly intuitive and makes for slightly messier code. Adding SDL_GetDefaultCursor is trivial and makes the API more complete in my eyes. Calling SDL_FreeCursor on the default cursor is already handled as an early return by SDL_FreeCursor, so that's not an issue. I've attached a diff patch to add the function.