Skip to content

WIN_ShowCursor function is now capable of processing NULL as a SDL_Cursor* (repost) #13713

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Gabrunken
Copy link

I added an SDL Hint called "SDL_HINT_WINDOWS_FORCE_NULL_CURSOR" which lets you decide
to have a NULL windows cursor, which is the intended way to hide it in a window, or "fake" by making it invisible.
Now the issue was that since GetCursorPos wasnt working when the cursor was NULL, and for other reasons,
this commit (8fee82d) fixed it by putting a blank surface as the cursor (hiding it); altho this wasn't working properly on Vitual Machines such as VMWare Workstation Pro when the SDL app in fullscreen, since the cursor was effectively not there, but when moved could exit the VM, which is unwanted behaviour. With this SDL Hint you can decide that (0 for fake cursor, 1 for actual NULL pointer).

This was tested in VMWare Workstation Pro with Windows 10 64 bit, using SDL3 SDL_HideCursor() function.

Fixed issue #13700

Now a new SDL hint is available for use.
SDL_HINT_WINDOWS_FORCE_NULL_CURSOR can be set to 1 if the Windows cursor is specifically needed to be NULL, such as in VM's.
@Gabrunken
Copy link
Author

all good?

@Gabrunken Gabrunken changed the title WIN_ShowCursor function is now capable of processing NULL as a SDL_Cursor* parameter #13712 (repost) WIN_ShowCursor function is now capable of processing NULL as a SDL_Cursor* (repost) Aug 7, 2025
@sezero sezero requested a review from slouken August 7, 2025 23:41
@Gabrunken
Copy link
Author

btw you guys have a discord solely for this?? would be cool to join

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant