From 2abcc32bbd0ba350ea552925b04b0522d78e56fe Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Fri, 23 Aug 2013 00:07:21 +1200 Subject: Fixed a few issues bought up in code review. --- Source/Plugins/Plugin_VideoSoftware/Src/EfbCopy.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'Source/Plugins/Plugin_VideoSoftware/Src/EfbCopy.cpp') diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/EfbCopy.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/EfbCopy.cpp index 3959942f83..5b858e61a8 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/EfbCopy.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/EfbCopy.cpp @@ -53,8 +53,8 @@ namespace EfbCopy int left = bpmem.copyTexSrcXY.x; int top = bpmem.copyTexSrcXY.y; - int right = left + bpmem.copyTexSrcWH.x + 1; - int bottom = top + bpmem.copyTexSrcWH.y + 1; + int right = left + bpmem.copyTexSrcWH.x; + int bottom = top + bpmem.copyTexSrcWH.y; for (u16 y = top; y <= bottom; y++) { @@ -72,12 +72,10 @@ namespace EfbCopy rc.left = (int)bpmem.copyTexSrcXY.x; rc.top = (int)bpmem.copyTexSrcXY.y; - // Here Width+1 like Height, otherwise some textures are corrupted already since the native resolution. - rc.right = (int)(bpmem.copyTexSrcXY.x + bpmem.copyTexSrcWH.x + 1); - rc.bottom = (int)(bpmem.copyTexSrcXY.y + bpmem.copyTexSrcWH.y + 1); - - //if (bpmem.triggerEFBCopy.copy_to_xfb) - // DebugUtil::OnFrameEnd(); // FIXME: not actually frame end + // flipper represents the widths internally as last pixel minus starting pixel, so + // these are zero indexed. + rc.right = rc.left + (int)bpmem.copyTexSrcWH.x + 1; + rc.bottom = rc.top + (int)bpmem.copyTexSrcWH.y + 1; if (!g_bSkipCurrentFrame) { -- cgit v1.2.3