Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GUI2/Window: don't constantly send useless DRAW events to the queue
This is a small subset of a change made on accelerated_rendering. Essentially, since drawing doesn't happen until events::pump is called, and that function also drops all but one DRAW event from the queue, sending a DRAW event every 20 ms is just useless noise and excessive CPU use. There should be no change in the actual rate GUI2 dialogs are redrawn with this change.
- Loading branch information
Showing
1 changed file
with
26 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b73e8dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean "There should be no change in the actual rate GUI2 dialogs are redrawn"? From what I can tell, you doubled the rate from 50 FPS to 100 FPS. This is the only thing that continues to limit the FPS.
b73e8dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh geez. SDL_WaitEventTimeout won't do?