diff options
| author | Nolan Check <Nolan.Check@gmail.com> | 2009-07-18 20:38:35 +0000 |
|---|---|---|
| committer | Nolan Check <Nolan.Check@gmail.com> | 2009-07-18 20:38:35 +0000 |
| commit | bddb8c8b97e25cfacdad80ccb5be1578af8f8ab5 (patch) | |
| tree | 8c434a2f17369fbc35a03be6b7c9e08b0537e777 /Source/Core/VideoCommon/Src/BPStructs.cpp | |
| parent | 9e16a5ccd8c9a263ad0688d5d0cf10e86570987a (diff) | |
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
Diffstat (limited to 'Source/Core/VideoCommon/Src/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/BPStructs.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp index 4b2df5d4a9..6629f3f17b 100644 --- a/Source/Core/VideoCommon/Src/BPStructs.cpp +++ b/Source/Core/VideoCommon/Src/BPStructs.cpp @@ -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 |
