diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-04-09 16:11:09 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-05-28 23:27:59 -0400 |
| commit | 0c3958bbe5d29f64bd678464799f061e7a189cdb (patch) | |
| tree | ae326b2621333b2356752aac3e8b96bf72c4af0c /Source/Core/VideoBackends/D3D/Render.cpp | |
| parent | 3ee447e5f7d759196336d995ee0f48223aa54c27 (diff) | |
D3D/Render: Join variable with declaration
Diffstat (limited to 'Source/Core/VideoBackends/D3D/Render.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/Render.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index dbfa59d5d0..46ade2fab8 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -749,20 +749,17 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, } else if (g_ActiveConfig.bUseXFB) { - const XFBSource* xfbSource; - // draw each xfb source for (u32 i = 0; i < xfbCount; ++i) { - xfbSource = (const XFBSource*)xfbSourceList[i]; - - TargetRectangle drawRc; + const auto* const xfbSource = static_cast<const XFBSource*>(xfbSourceList[i]); // use virtual xfb with offset int xfbHeight = xfbSource->srcHeight; int xfbWidth = xfbSource->srcWidth; int hOffset = ((s32)xfbSource->srcAddr - (s32)xfbAddr) / ((s32)fbStride * 2); + TargetRectangle drawRc; drawRc.top = targetRc.top + hOffset * targetRc.GetHeight() / (s32)fbHeight; drawRc.bottom = targetRc.top + (hOffset + xfbHeight) * targetRc.GetHeight() / (s32)fbHeight; drawRc.left = targetRc.left + |
