summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbooto <remornicus@gmail.com>2015-07-25 01:46:41 +0800
committerbooto <remornicus@gmail.com>2015-07-25 01:52:13 +0800
commitc43ae67b3bac38fa65316329a00a1f62dcb9ead6 (patch)
tree870f229b539b9de76c3cb94321c49897c17e0f81
parent2e28ed3291bc531ba5d0cd4057aa9cefdbf128be (diff)
RealXFB sizes don't get scaled by IR
When calculating the size of the undisplayed margin in the case where fbWidth != fbStride for RealXFB for displaying in the output window, we do not scale by IR - RealXFB is implicitly 1x.
-rw-r--r--Source/Core/VideoBackends/OGL/Render.cpp16
-rw-r--r--Source/Core/VideoCommon/VideoCommon.h7
2 files changed, 12 insertions, 11 deletions
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp
index 85e7956b09..7fefeaff81 100644
--- a/Source/Core/VideoBackends/OGL/Render.cpp
+++ b/Source/Core/VideoBackends/OGL/Render.cpp
@@ -1456,10 +1456,16 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
xfbSource = (const XFBSource*) xfbSourceList[i];
TargetRectangle drawRc;
+ TargetRectangle sourceRc;
+ sourceRc.left = xfbSource->sourceRc.left;
+ sourceRc.right = xfbSource->sourceRc.right;
+ sourceRc.top = xfbSource->sourceRc.top;
+ sourceRc.bottom = xfbSource->sourceRc.bottom;
if (g_ActiveConfig.bUseRealXFB)
{
drawRc = flipped_trc;
+ sourceRc.right -= fbStride - fbWidth;
}
else
{
@@ -1481,18 +1487,12 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
//drawRc.bottom *= vScale;
//drawRc.left *= hScale;
//drawRc.right *= hScale;
+
+ sourceRc.right -= Renderer::EFBToScaledX(fbStride - fbWidth);
}
// Tell the OSD Menu about the current internal resolution
OSDInternalW = xfbSource->sourceRc.GetWidth(); OSDInternalH = xfbSource->sourceRc.GetHeight();
- TargetRectangle sourceRc;
- sourceRc.left = xfbSource->sourceRc.left;
- sourceRc.right = xfbSource->sourceRc.right;
- sourceRc.top = xfbSource->sourceRc.top;
- sourceRc.bottom = xfbSource->sourceRc.bottom;
-
- sourceRc.right -= Renderer::EFBToScaledX(fbStride - fbWidth);
-
BlitScreen(sourceRc, drawRc, xfbSource->texture, xfbSource->texWidth, xfbSource->texHeight);
}
}
diff --git a/Source/Core/VideoCommon/VideoCommon.h b/Source/Core/VideoCommon/VideoCommon.h
index b81ebb8929..de27145c4a 100644
--- a/Source/Core/VideoCommon/VideoCommon.h
+++ b/Source/Core/VideoCommon/VideoCommon.h
@@ -19,9 +19,10 @@ enum
EFB_HEIGHT = 528,
};
-// XFB width is decided by EFB copy operation. The VI can do horizontal
-// scaling (TODO: emulate).
-const u32 MAX_XFB_WIDTH = EFB_WIDTH;
+// Max XFB width is 720. You can only copy out 640 wide areas of efb to XFB
+// so you need multiple copies to do the full width.
+// The VI can do horizontal scaling (TODO: emulate).
+const u32 MAX_XFB_WIDTH = 720;
// Although EFB height is 528, 574-line XFB's can be created either with
// vertical scaling by the EFB copy operation or copying to multiple XFB's