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
This commit is contained in:
NeoBrainX
2010-12-11 21:07:07 +00:00
parent c7b736bb56
commit 3b6b8b718c
2 changed files with 8 additions and 8 deletions

View File

@ -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);
}
}
}