Merge pull request #12254 from AdmiralCurtiss/savestate-no-xfb-stride

VideoCommon: Don't swap on state load when there's no XFB.
This commit is contained in:
Tilka 2023-10-28 02:14:30 +01:00 committed by GitHub
commit 2212a5b225
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -737,12 +737,12 @@ void Presenter::DoState(PointerWrap& p)
p.Do(m_last_xfb_stride);
p.Do(m_last_xfb_height);
if (p.IsReadMode())
// If we're loading and there is a last XFB, re-display it.
if (p.IsReadMode() && m_last_xfb_stride != 0)
{
// This technically counts as the end of the frame
AfterFrameEvent::Trigger();
// re-display the most recent XFB
ImmediateSwap(m_last_xfb_addr, m_last_xfb_width, m_last_xfb_stride, m_last_xfb_height,
m_last_xfb_ticks);
}