Fix #7950: Incorrect setup of Normal Screenshot ViewPort #7959
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.
As described in #7950, selecting a Normal Screenshot would sometimes incorrectly result in the "Huge Screenshot" dialog box being shown. The dialog box would present the resolution that would be used for a default zoom screenshot even though this would not match the actual screenshot's resolution.
This pr fixes #7950 by adding handling of
SC_VIEWPORT
(andSC_CRASHLOG
for completeness) intoSetupScreenshotViewport()
.Note that I don't understand all the intricacies associated with ViewPorts. Currently the
ScreenshotWindow::TakeScreenshot()
is the only place whereSetupScreenshotViewport()
is used witht == SC_VIEWPORT
. So, the only properties of the viewport that currently matter in this context are the width and height. I've included the others, with what I think are appropriate values, but I may have made a mistake with these.