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 SDL_HINT_WINDOWS_CLIPCURSOR_UPDATE_INTERVAL_MS #8006

Closed
expikr opened this issue Jul 19, 2023 · 4 comments · Fixed by #10085
Closed

Add SDL_HINT_WINDOWS_CLIPCURSOR_UPDATE_INTERVAL_MS #8006

expikr opened this issue Jul 19, 2023 · 4 comments · Fixed by #10085
Milestone

Comments

@expikr
Copy link
Contributor

expikr commented Jul 19, 2023

Make this value customizable, where a value of zero disables the periodic refresh:

const int CLIPCURSOR_UPDATE_INTERVAL_MS = 3000;

This solves two birds with one stone:

  1. The frequency can be increased for developers who desire it, such as with the scenario raised by @Susko3 (Cursor not constrained to window when using SDL_SetRelativeMouseMode and another game is running #7890) which is outside of SDL's control and so may require such a workaround.

  2. The periodic check can be disabled for debugging purposes, for developers that manually manipulate the ClipCursor state and do not want SDL constantly stepping over their toes. There does not appear to be a way for developers to manipulate SDL_WindowData.skip_update_clipcursor so it makes more sense to customize the interval itself, and in any case it's probably more versatile since it simultaneously enables (1.)

@Susko3
Copy link
Contributor

Susko3 commented Jul 20, 2023

This doesn't fix my issue, as the game in question seems to basically be doing while(1) ClipCursor(NULL);.

@expikr
Copy link
Contributor Author

expikr commented Jul 20, 2023

I just meant that it can be a temporary workaround before WoT fixes it on their end, by increasing the frequency of that refresh to counteract their ClipCursor calls.

@slouken slouken added this to the 3.2.0 milestone Nov 8, 2023
@slouken
Copy link
Collaborator

slouken commented Mar 26, 2024

FYI, I'm doing a bunch of work on raw input on Windows and I plan to come back to your PRs soon.

@slouken
Copy link
Collaborator

slouken commented Jun 16, 2024

Feel free to put together a PR for this!

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 a pull request may close this issue.

3 participants