From f4e838597349d33c58bd396ccdece7e5b74e7fc1 Mon Sep 17 00:00:00 2001 From: Rodolfo Osvaldo Bogado Date: Fri, 5 Feb 2010 03:37:11 +0000 Subject: [PATCH] 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 --- Source/Plugins/Plugin_VideoDX9/Src/Render.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp index 70a35f87f5..3805d312b1 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp @@ -724,10 +724,10 @@ bool Renderer::SetScissorRect() int Xstride = (s_Fulltarget_width - s_target_width) / 2; int Ystride = (s_Fulltarget_height - s_target_height) / 2; - rc.left = (int)(rc.left * xScale) + Xstride; - rc.top = (int)(rc.top * yScale) + Ystride; - rc.right = (int)(rc.right * xScale) + Xstride; - rc.bottom = (int)(rc.bottom * yScale) + Ystride; + rc.left = (int)(rc.left * xScale); + rc.top = (int)(rc.top * yScale); + rc.right = (int)(rc.right * xScale); + rc.bottom = (int)(rc.bottom * yScale); if (rc.left < 0) rc.left = 0; if (rc.right < 0) rc.right = 0; @@ -737,6 +737,12 @@ bool Renderer::SetScissorRect() if (rc.bottom < 0) rc.bottom = 0; if (rc.top > s_target_height) rc.top = 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) { int temp = rc.right;