Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function for getting the default cursor #828

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

Add a function for getting the default cursor #828

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@SDLBugzilla
Copy link
Collaborator

SDLBugzilla commented Feb 10, 2021

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: All, All

Comments on the original bug report:

On 2013-04-11 20:24:48 +0000, Alex Szpakowski wrote:

Created attachment 1108
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.

On 2013-04-24 13:51:32 +0000, (disabled) Jørgen Tjernø wrote:

Fixed in http://hg.libsdl.org/SDL/rev/4e4ca313000c

@SDLBugzilla SDLBugzilla added the enhancement New feature or request label Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant