imgui demo_ui: no more delay (no more mouse wiggling) #72318
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
None
Purpose of change
No more mouse wiggling in ImGui demo!
Fix #72215
Experimentally determined the timeout is in milliseconds, so I wrote in the docs.
Describe the solution
Set delay to 5. This allows for 200FPS (I get 70FPS) while not burning the PC like when I set it to 0.
Looking back, it was mentioned in the issue, but I didn't understand how to do it.
Describe alternatives you've considered
Set the delay to a different amount, like 16ms for 60 FPS. I feel like 50ms is too low, as it allows only 20FPS which might not be ideal for some animations (which are present in the ImGui demo).
Testing
Inputs & Focus update instantly and as expected.
Plots work without the mouse wiggling.
Additional context
I was working on #69831 and needed to fix the input delays. Since my starting point was ImGui demo, I came back to fix it.