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.
This commit is contained in:
parent
2e28ed3291
commit
c43ae67b3b
|
@ -1456,10 +1456,16 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
|
||||||
xfbSource = (const XFBSource*) xfbSourceList[i];
|
xfbSource = (const XFBSource*) xfbSourceList[i];
|
||||||
|
|
||||||
TargetRectangle drawRc;
|
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)
|
if (g_ActiveConfig.bUseRealXFB)
|
||||||
{
|
{
|
||||||
drawRc = flipped_trc;
|
drawRc = flipped_trc;
|
||||||
|
sourceRc.right -= fbStride - fbWidth;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1481,18 +1487,12 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
|
||||||
//drawRc.bottom *= vScale;
|
//drawRc.bottom *= vScale;
|
||||||
//drawRc.left *= hScale;
|
//drawRc.left *= hScale;
|
||||||
//drawRc.right *= hScale;
|
//drawRc.right *= hScale;
|
||||||
|
|
||||||
|
sourceRc.right -= Renderer::EFBToScaledX(fbStride - fbWidth);
|
||||||
}
|
}
|
||||||
// Tell the OSD Menu about the current internal resolution
|
// Tell the OSD Menu about the current internal resolution
|
||||||
OSDInternalW = xfbSource->sourceRc.GetWidth(); OSDInternalH = xfbSource->sourceRc.GetHeight();
|
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);
|
BlitScreen(sourceRc, drawRc, xfbSource->texture, xfbSource->texWidth, xfbSource->texHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,10 @@ enum
|
||||||
EFB_HEIGHT = 528,
|
EFB_HEIGHT = 528,
|
||||||
};
|
};
|
||||||
|
|
||||||
// XFB width is decided by EFB copy operation. The VI can do horizontal
|
// Max XFB width is 720. You can only copy out 640 wide areas of efb to XFB
|
||||||
// scaling (TODO: emulate).
|
// so you need multiple copies to do the full width.
|
||||||
const u32 MAX_XFB_WIDTH = EFB_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
|
// 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
|
// vertical scaling by the EFB copy operation or copying to multiple XFB's
|
||||||
|
|
Loading…
Reference in New Issue