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
Deduplicate tick-related code in video drivers #8703
Merged
Merged
Conversation
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
TrueBrain
force-pushed
the
video-merge
branch
from
February 20, 2021 11:31
d880a34
to
3f0611d
Compare
nielsmh
reviewed
Feb 20, 2021
…ivers It was of all the drivers the only one doing this slightly different. When trying to unify more code, that was rather annoying.
Also move this function to be a class member. This to allow further deduplicating of code in a later commit.
… is called Additionally, make sure this is a class method. Later commits will make use of this.
These were special settings only for the win32-drivers, and introduced in the very first version we track. Time kinda had caught up with those variables, so it is time to say farewell. force_full_redraw was most likely a debug functionality "in case our dirty-rect fails". This should no longer be needed. display_hz was cute, as it had a max of 120. That is kinda out-dated information, but I also doubt anyone was really using this.
They were all identical, so better put this in a single place hoping it is less likely to break.
TrueBrain
force-pushed
the
video-merge
branch
from
February 20, 2021 13:26
67a7a74
to
80602ef
Compare
michicc
approved these changes
Feb 20, 2021
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.
Looks okay and is confirmed to work for win32.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Contains #8702, as I was too lazy to do this work twice.
Motivation / Problem
During the 60fps it was found that all (!) video drivers have nearly the same GameLoop code, with some minor naming differences and some minor workflow differences.
This PR sets out to unify them further, and deduplicate the tick-related code.
Future extensions are helped by this, because now they can change in a single place how the game-ticks and draw-ticks behave. For example, if the game-tick takes too long, there would be a single place to make a choice what suffers: simulation time or draw-fps.
Description
This is mostly moving around code and making sure drivers do the same into the highest amount of detail.
Drivers I have tested and on what platform:
To me, they all behave identical. More testing is of course appreciated :)
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.