fix for my last commit please test, and sorry for the error :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5010 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado 2010-02-05 03:37:11 +00:00
parent b4d7a0e20d
commit f4e8385973
1 changed files with 10 additions and 4 deletions

View File

@ -724,10 +724,10 @@ bool Renderer::SetScissorRect()
int Xstride = (s_Fulltarget_width - s_target_width) / 2; int Xstride = (s_Fulltarget_width - s_target_width) / 2;
int Ystride = (s_Fulltarget_height - s_target_height) / 2; int Ystride = (s_Fulltarget_height - s_target_height) / 2;
rc.left = (int)(rc.left * xScale) + Xstride; rc.left = (int)(rc.left * xScale);
rc.top = (int)(rc.top * yScale) + Ystride; rc.top = (int)(rc.top * yScale);
rc.right = (int)(rc.right * xScale) + Xstride; rc.right = (int)(rc.right * xScale);
rc.bottom = (int)(rc.bottom * yScale) + Ystride; rc.bottom = (int)(rc.bottom * yScale);
if (rc.left < 0) rc.left = 0; if (rc.left < 0) rc.left = 0;
if (rc.right < 0) rc.right = 0; if (rc.right < 0) rc.right = 0;
@ -737,6 +737,12 @@ bool Renderer::SetScissorRect()
if (rc.bottom < 0) rc.bottom = 0; if (rc.bottom < 0) rc.bottom = 0;
if (rc.top > s_target_height) rc.top = s_target_height; if (rc.top > s_target_height) rc.top = s_target_height;
if (rc.bottom > s_target_height) rc.bottom = s_target_height; if (rc.bottom > s_target_height) rc.bottom = s_target_height;
rc.left += Xstride;
rc.top += Ystride;
rc.right += Xstride;
rc.bottom += Ystride;
if (rc.left > rc.right) if (rc.left > rc.right)
{ {
int temp = rc.right; int temp = rc.right;