summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/RenderBase.cpp
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@googlemail.com>2010-12-11 21:07:07 +0000
committerNeoBrainX <NeoBrainX@googlemail.com>2010-12-11 21:07:07 +0000
commit3b6b8b718c54cd6f40aca22807ce6917b99d6025 (patch)
tree1b2775f070fc0329b92405b045f878c659e15c3e /Source/Core/VideoCommon/Src/RenderBase.cpp
parentc7b736bb562fb35c107b54fde2458651e5b9275f (diff)
Fix some off-by-one errors in the EFB scaling stuff.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6559 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/RenderBase.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/RenderBase.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Src/RenderBase.cpp b/Source/Core/VideoCommon/Src/RenderBase.cpp
index 2fd7a9ecdf..1237af7c55 100644
--- a/Source/Core/VideoCommon/Src/RenderBase.cpp
+++ b/Source/Core/VideoCommon/Src/RenderBase.cpp
@@ -262,13 +262,13 @@ void Renderer::CalculateXYScale(const TargetRectangle& dst_rect)
if (g_ActiveConfig.b3DVision)
{
// This works, yet the version in the else doesn't. No idea why.
- xScale = (float)s_backbuffer_width / (float)s_XFB_width;
- yScale = (float)s_backbuffer_height / (float)s_XFB_height;
+ xScale = (float)(s_backbuffer_width-1) / (float)(s_XFB_width-1);
+ yScale = (float)(s_backbuffer_height-1) / (float)(s_XFB_height-1);
}
else
{
- xScale = (float)(dst_rect.right - dst_rect.left) / (float)s_XFB_width;
- yScale = (float)(dst_rect.bottom - dst_rect.top) / (float)s_XFB_height;
+ xScale = (float)(dst_rect.right - dst_rect.left - 1) / (float)(s_XFB_width-1);
+ yScale = (float)(dst_rect.bottom - dst_rect.top - 1) / (float)(s_XFB_height-1);
}
}
}