From 8f5223d0e66bf3fa3c1fe314b8e40c19555d3b09 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Fri, 28 Sep 2012 23:21:09 +0200 Subject: [PATCH] More cleanups. --- Source/Plugins/Plugin_VideoDX11/Src/Render.cpp | 16 ++++++++-------- Source/Plugins/Plugin_VideoDX9/Src/Render.cpp | 16 ++++++++-------- Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 17 ++++++++--------- 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp index 857688ceec..5b031a850f 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp @@ -974,7 +974,14 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons MathUtil::Rectangle drawRc; - if (g_ActiveConfig.bUseXFB && !g_ActiveConfig.bUseRealXFB) + if (g_ActiveConfig.bUseRealXFB) + { + drawRc.top = 1; + drawRc.bottom = -1; + drawRc.left = -1; + drawRc.right = 1; + } + else { // use virtual xfb with offset int xfbHeight = xfbSource->srcHeight; @@ -995,13 +1002,6 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons //drawRc.left *= hScale; //drawRc.right *= hScale; } - else - { - drawRc.top = 1; - drawRc.bottom = -1; - drawRc.left = -1; - drawRc.right = 1; - } xfbSource->Draw(sourceRc, drawRc, 0, 0); } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp index c2e1c46bfd..ea2afab345 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Render.cpp @@ -949,7 +949,14 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons MathUtil::Rectangle drawRc; - if (!g_ActiveConfig.bUseRealXFB) + if (g_ActiveConfig.bUseRealXFB) + { + drawRc.top = -1; + drawRc.bottom = 1; + drawRc.left = -1; + drawRc.right = 1; + } + else { // use virtual xfb with offset int xfbHeight = xfbSource->srcHeight; @@ -970,13 +977,6 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons //drawRc.left *= hScale; //drawRc.right *= hScale; } - else - { - drawRc.top = -1; - drawRc.bottom = 1; - drawRc.left = -1; - drawRc.right = 1; - } xfbSource->Draw(sourceRc, drawRc, Width, Height); } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 4bdee8e198..cf81459245 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -1067,7 +1067,14 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons MathUtil::Rectangle drawRc; - if (!g_ActiveConfig.bUseRealXFB) + if (g_ActiveConfig.bUseRealXFB) + { + drawRc.top = 1; + drawRc.bottom = -1; + drawRc.left = -1; + drawRc.right = 1; + } + else { // use virtual xfb with offset int xfbHeight = xfbSource->srcHeight; @@ -1088,14 +1095,6 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons //drawRc.left *= hScale; //drawRc.right *= hScale; } - else - { - drawRc.top = 1; - drawRc.bottom = -1; - drawRc.left = -1; - drawRc.right = 1; - } - // Tell the OSD Menu about the current internal resolution OSDInternalW = xfbSource->sourceRc.GetWidth(); OSDInternalH = xfbSource->sourceRc.GetHeight();