Seems to fix issue 1131. Please test Real XFB mode.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3838 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Nolan Check 2009-07-18 20:38:35 +00:00
parent 9e16a5ccd8
commit bddb8c8b97
1 changed files with 18 additions and 4 deletions

View File

@ -206,12 +206,26 @@ void BPWritten(const Bypass& bp)
#ifdef BBOX_SUPPORT
*g_VideoInitialize.pBBoxActive = false;
#endif
const float yScale = bpmem.dispcopyyscale / 256.0f;
const float xfbLines = ((bpmem.copyTexSrcWH.y + 1.0f) * yScale);
float yScale;
// PE_copy.scale_something may indicate that yScale is inverted.
// Not 100% sure if that's true, but this seems to fix SMG in PAL50 mode.
if (PE_copy.scale_something)
yScale = 256.0f / (float)bpmem.dispcopyyscale;
else
yScale = (float)bpmem.dispcopyyscale / 256.0f;
float xfbLines = ((bpmem.copyTexSrcWH.y + 1.0f) * yScale);
if (xfbLines > MAX_XFB_HEIGHT)
{
WARN_LOG(VIDEO, "Tried to scale EFB to too many XFB lines (%u)", (u32)xfbLines);
xfbLines = MAX_XFB_HEIGHT;
}
RenderToXFB(bp, rc, yScale, xfbLines,
bpmem.copyTexDest << 5,
bpmem.copyMipMapStrideChannels << 4,
(u32)ceil(xfbLines));
bpmem.copyMipMapStrideChannels << 4,
(u32)xfbLines);
}
// Clear the picture after it's done and submitted, to prepare for the next picture