diff options
| author | skidau <skidau@gmail.com> | 2015-01-25 15:44:06 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2015-01-25 15:44:06 +1100 |
| commit | d7a875222804cb9ab6fda6041d12190ec7d8aab2 (patch) | |
| tree | fc59e805f9d9fa5655075a4255d4ed1ce44c563f /Source/Core/VideoBackends/OGL/Render.cpp | |
| parent | bf0293231f4f87f1678cc4033dada67413e505b4 (diff) | |
| parent | 4768d0f0a8a2ebec7a35dc0b11dd953e77e24356 (diff) | |
Merge pull request #1920 from CarlKenner/fix3dxfb
Fix 3D XFB
Diffstat (limited to 'Source/Core/VideoBackends/OGL/Render.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/Render.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 3d1991fe3f..019f5d2556 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -1485,10 +1485,10 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co int xfbWidth = xfbSource->srcWidth; int hOffset = ((s32)xfbSource->srcAddr - (s32)xfbAddr) / ((s32)fbStride * 2); - drawRc.top = flipped_trc.top - hOffset * flipped_trc.GetHeight() / fbHeight; - drawRc.bottom = flipped_trc.top - (hOffset + xfbHeight) * flipped_trc.GetHeight() / fbHeight; - drawRc.left = flipped_trc.left + (flipped_trc.GetWidth() - xfbWidth * flipped_trc.GetWidth() / fbStride) / 2; - drawRc.right = flipped_trc.left + (flipped_trc.GetWidth() + xfbWidth * flipped_trc.GetWidth() / fbStride) / 2; + drawRc.top = flipped_trc.top - hOffset * flipped_trc.GetHeight() / (s32)fbHeight; + drawRc.bottom = flipped_trc.top - (hOffset + xfbHeight) * flipped_trc.GetHeight() / (s32)fbHeight; + drawRc.left = flipped_trc.left + (flipped_trc.GetWidth() - xfbWidth * flipped_trc.GetWidth() / (s32)fbStride) / 2; + drawRc.right = flipped_trc.left + (flipped_trc.GetWidth() + xfbWidth * flipped_trc.GetWidth() / (s32)fbStride) / 2; // The following code disables auto stretch. Kept for reference. // scale draw area for a 1 to 1 pixel mapping with the draw target |
