summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/RenderBase.cpp
diff options
context:
space:
mode:
authormimimi085181 <mimimi085181@gmail.com>2016-04-26 23:25:38 +0200
committermimimi085181 <mimimi085181@gmail.com>2016-04-26 23:25:38 +0200
commit8c34463f14a624a7dd15cf322abd20a4e64cb404 (patch)
tree27df6ce5ed01e44209af6fdd2e13eb18d01fab02 /Source/Core/VideoCommon/RenderBase.cpp
parent3033096223de1a212d475cd670705c00daeba88d (diff)
Make integral auto IR(multiple of 640x528) work as expected
Right now, it's possible that x and y are scaled differently, if efb and xfb size are not the same.
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
-rw-r--r--Source/Core/VideoCommon/RenderBase.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index 212d03a939..bd187b855f 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -189,13 +189,18 @@ bool Renderer::CalculateTargetSize(unsigned int framebuffer_width, unsigned int
if (s_last_efb_scale == SCALE_AUTO_INTEGRAL)
{
- newEFBWidth = ((newEFBWidth-1) / EFB_WIDTH + 1) * EFB_WIDTH;
- newEFBHeight = ((newEFBHeight-1) / EFB_HEIGHT + 1) * EFB_HEIGHT;
+ efb_scale_numeratorX = efb_scale_numeratorY = std::max((newEFBWidth - 1) / EFB_WIDTH + 1, (newEFBHeight - 1) / EFB_HEIGHT + 1);
+ efb_scale_denominatorX = efb_scale_denominatorY = 1;
+ newEFBWidth = EFBToScaledX(EFB_WIDTH);
+ newEFBHeight = EFBToScaledY(EFB_HEIGHT);
+ }
+ else
+ {
+ efb_scale_numeratorX = newEFBWidth;
+ efb_scale_denominatorX = EFB_WIDTH;
+ efb_scale_numeratorY = newEFBHeight;
+ efb_scale_denominatorY = EFB_HEIGHT;
}
- efb_scale_numeratorX = newEFBWidth;
- efb_scale_denominatorX = EFB_WIDTH;
- efb_scale_numeratorY = newEFBHeight;
- efb_scale_denominatorY = EFB_HEIGHT;
break;
case SCALE_1X: