summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/FramebufferManagerBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/FramebufferManagerBase.cpp')
-rw-r--r--Source/Core/VideoCommon/FramebufferManagerBase.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/FramebufferManagerBase.cpp b/Source/Core/VideoCommon/FramebufferManagerBase.cpp
index 0fc65a5443..dd2cc88735 100644
--- a/Source/Core/VideoCommon/FramebufferManagerBase.cpp
+++ b/Source/Core/VideoCommon/FramebufferManagerBase.cpp
@@ -248,20 +248,18 @@ void FramebufferManagerBase::ReplaceVirtualXFB()
}
}
-int FramebufferManagerBase::ScaleToVirtualXfbWidth(int x)
+int FramebufferManagerBase::ScaleToVirtualXfbWidth(int x, const TargetRectangle& target_rectangle)
{
if (g_ActiveConfig.RealXFBEnabled())
return x;
- return x * static_cast<int>(g_renderer->GetTargetRectangle().GetWidth()) /
- static_cast<int>(FramebufferManagerBase::LastXfbWidth());
+ return x * target_rectangle.GetWidth() / s_last_xfb_width;
}
-int FramebufferManagerBase::ScaleToVirtualXfbHeight(int y)
+int FramebufferManagerBase::ScaleToVirtualXfbHeight(int y, const TargetRectangle& target_rectangle)
{
if (g_ActiveConfig.RealXFBEnabled())
return y;
- return y * static_cast<int>(g_renderer->GetTargetRectangle().GetHeight()) /
- static_cast<int>(FramebufferManagerBase::LastXfbHeight());
+ return y * target_rectangle.GetHeight() / s_last_xfb_height;
}