diff --git a/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp b/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp index dbea1abf19..5ce9b1a8f9 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp @@ -602,6 +602,13 @@ void LoadBPReg(u32 value0) ((u32*)&bpmem)[opcode] = newval; TRectangle rc = { + (int)(bpmem.copyTexSrcXY.x), + (int)(bpmem.copyTexSrcXY.y), + (int)((bpmem.copyTexSrcXY.x + bpmem.copyTexSrcWH.x)), + (int)((bpmem.copyTexSrcXY.y + bpmem.copyTexSrcWH.y)) + }; + //Need another rc here to get it to scale. + TRectangle multirc = { (int)(bpmem.copyTexSrcXY.x * MValue), (int)(bpmem.copyTexSrcXY.y * MValue), (int)((bpmem.copyTexSrcXY.x * MValue + bpmem.copyTexSrcWH.x * MValue)), @@ -619,7 +626,7 @@ void LoadBPReg(u32 value0) } else { // EFB to XFB - Renderer::Swap(rc); + Renderer::Swap(multirc); g_VideoInitialize.pCopiedToXFB(); } @@ -633,8 +640,8 @@ void LoadBPReg(u32 value0) glViewport(0, 0, Renderer::GetTargetWidth(), Renderer::GetTargetHeight()); // if copied to texture, set the dimensions to the source copy dims, otherwise, clear the entire buffer if( PE_copy.copy_to_xfb == 0 ) - glScissor(rc.left * MValue, (Renderer::GetTargetHeight()-rc.bottom * MValue), - (rc.right * MValue - rc.left * MValue), (rc.bottom * MValue-rc.top * MValue)); + glScissor(multirc.left, (Renderer::GetTargetHeight() - multirc.bottom), + (multirc.right - multirc.left), (multirc.bottom - multirc.top)); VertexShaderMngr::SetViewportChanged(); // since clear operations use the source rectangle, have to do regular renders (glClear clears the entire buffer) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp index ae4b672e3c..03c811e316 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp @@ -318,6 +318,8 @@ void TextureMngr::CopyRenderTargetToTexture(u32 address, bool bFromZBuffer, bool entry.frameCount = frameCount; int mult = bScaleByHalf?2:1; + // int wmulti = (abs(source->right-source->left)/mult+7)&~7; + //int hmulti = (abs(source->bottom-source->top)/mult+7)&~7; int w = (abs(source->right-source->left)/mult+7)&~7; int h = (abs(source->bottom-source->top)/mult+7)&~7;