Correctly pass un-rotated width/height to presentation pipeline.

This commit is contained in:
Henrik Rydgård 2023-04-11 22:27:03 +02:00
parent 652612cf15
commit 88899984e3
2 changed files with 5 additions and 5 deletions

View File

@ -931,8 +931,7 @@ void PresentationCommon::CalculateRenderResolution(int *width, int *height, int
bool firstIsUpscalingFilter = shaderInfo.empty() ? false : shaderInfo.front()->isUpscalingFilter;
int firstSSAAFilterLevel = shaderInfo.empty() ? 0 : shaderInfo.front()->SSAAFilterLevel;
// Actually, auto mode should be more granular...
// Round up to a zoom factor for the render size.
// In auto mode (zoom == 0), round up to an integer zoom factor for the render size.
int zoom = g_Config.iInternalResolution;
if (zoom == 0 || firstSSAAFilterLevel >= 2) {
// auto mode, use the longest dimension
@ -963,10 +962,9 @@ void PresentationCommon::CalculateRenderResolution(int *width, int *height, int
if (IsVREnabled()) {
*width = 480 * zoom;
*height = 480 * zoom;
} else if (g_Config.IsPortrait()) {
*width = 272 * zoom;
*height = 480 * zoom;
} else {
// Note: We previously checked g_Config.IsPortrait (internal rotation) here but that was wrong -
// we still render at 480x272 * zoom.
*width = 480 * zoom;
*height = 272 * zoom;
}

View File

@ -82,6 +82,8 @@ public:
pixelWidth_ = w;
pixelHeight_ = h;
}
// NOTE: Should be un-rotated width/height.
void UpdateRenderSize(int rw, int rh) {
renderWidth_ = rw;
renderHeight_ = rh;