summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/FramebufferManagerBase.cpp
diff options
context:
space:
mode:
authorTony Wasserka <neobrainx@gmail.com>2014-05-05 22:05:21 +0200
committerTony Wasserka <neobrainx@gmail.com>2014-05-05 22:05:21 +0200
commitedbf90f9d25fdf5d2c080b1854695a9d77cd2134 (patch)
tree637a1fd4985eeee3076ea9073d5244a79393cab3 /Source/Core/VideoCommon/FramebufferManagerBase.cpp
parent093ee090b8b0ceade1c177c22dc829a836c1c9be (diff)
parentc01ac18d4d107b8fb85fed730423c3a490869a9e (diff)
Merge pull request #336 from magumagu/xfb-vertical-scale
XFB width/height handling fixes
Diffstat (limited to 'Source/Core/VideoCommon/FramebufferManagerBase.cpp')
-rw-r--r--Source/Core/VideoCommon/FramebufferManagerBase.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/FramebufferManagerBase.cpp b/Source/Core/VideoCommon/FramebufferManagerBase.cpp
index f23af5e36c..6e26dea190 100644
--- a/Source/Core/VideoCommon/FramebufferManagerBase.cpp
+++ b/Source/Core/VideoCommon/FramebufferManagerBase.cpp
@@ -46,6 +46,13 @@ const XFBSourceBase* const* FramebufferManagerBase::GetRealXFBSource(u32 xfbAddr
{
xfbCount = 1;
+ // recreate if needed
+ if (m_realXFBSource && (m_realXFBSource->texWidth != fbWidth || m_realXFBSource->texHeight != fbHeight))
+ {
+ delete m_realXFBSource;
+ m_realXFBSource = nullptr;
+ }
+
if (!m_realXFBSource)
m_realXFBSource = g_framebuffer_manager->CreateXFBSource(fbWidth, fbHeight);
@@ -142,8 +149,8 @@ void FramebufferManagerBase::CopyToVirtualXFB(u32 xfbAddr, u32 fbWidth, u32 fbHe
// recreate if needed
if (vxfb->xfbSource && (vxfb->xfbSource->texWidth != target_width || vxfb->xfbSource->texHeight != target_height))
{
- //delete vxfb->xfbSource;
- //vxfb->xfbSource = nullptr;
+ delete vxfb->xfbSource;
+ vxfb->xfbSource = nullptr;
}
if (!vxfb->xfbSource)