mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-10 21:44:28 +00:00
D3D/Render: Join variable with declaration
This commit is contained in:
parent
3ee447e5f7
commit
0c3958bbe5
@ -749,20 +749,17 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
|
|||||||
}
|
}
|
||||||
else if (g_ActiveConfig.bUseXFB)
|
else if (g_ActiveConfig.bUseXFB)
|
||||||
{
|
{
|
||||||
const XFBSource* xfbSource;
|
|
||||||
|
|
||||||
// draw each xfb source
|
// draw each xfb source
|
||||||
for (u32 i = 0; i < xfbCount; ++i)
|
for (u32 i = 0; i < xfbCount; ++i)
|
||||||
{
|
{
|
||||||
xfbSource = (const XFBSource*)xfbSourceList[i];
|
const auto* const xfbSource = static_cast<const XFBSource*>(xfbSourceList[i]);
|
||||||
|
|
||||||
TargetRectangle drawRc;
|
|
||||||
|
|
||||||
// use virtual xfb with offset
|
// use virtual xfb with offset
|
||||||
int xfbHeight = xfbSource->srcHeight;
|
int xfbHeight = xfbSource->srcHeight;
|
||||||
int xfbWidth = xfbSource->srcWidth;
|
int xfbWidth = xfbSource->srcWidth;
|
||||||
int hOffset = ((s32)xfbSource->srcAddr - (s32)xfbAddr) / ((s32)fbStride * 2);
|
int hOffset = ((s32)xfbSource->srcAddr - (s32)xfbAddr) / ((s32)fbStride * 2);
|
||||||
|
|
||||||
|
TargetRectangle drawRc;
|
||||||
drawRc.top = targetRc.top + hOffset * targetRc.GetHeight() / (s32)fbHeight;
|
drawRc.top = targetRc.top + hOffset * targetRc.GetHeight() / (s32)fbHeight;
|
||||||
drawRc.bottom = targetRc.top + (hOffset + xfbHeight) * targetRc.GetHeight() / (s32)fbHeight;
|
drawRc.bottom = targetRc.top + (hOffset + xfbHeight) * targetRc.GetHeight() / (s32)fbHeight;
|
||||||
drawRc.left = targetRc.left +
|
drawRc.left = targetRc.left +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user