mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-26 06:18:32 +00:00
VideoCommon: recreate XFB texture when the XFB size changes.
We need to do this to correctly deal with games which dynamically change the XFB width and height.
This commit is contained in:
parent
2db2f3dce9
commit
716b3fefd4
1 changed files with 9 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue