Closed expikr closed 4 months ago
This doesn't fix my issue, as the game in question seems to basically be doing while(1) ClipCursor(NULL);
.
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.
FYI, I'm doing a bunch of work on raw input on Windows and I plan to come back to your PRs soon.
Feel free to put together a PR for this!
Make this value customizable, where a value of zero disables the periodic refresh:
https://github.com/libsdl-org/SDL/blob/376a3cd100a3d59e887496c75a1ac49ab4a2d8ec/src/video/windows/SDL_windowsevents.c#L1729
This solves two birds with one stone:
The frequency can be increased for developers who desire it, such as with the scenario raised by @Susko3 (https://github.com/libsdl-org/SDL/issues/7890) which is outside of SDL's control and so may require such a workaround.
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.)