Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #12254 from AdmiralCurtiss/savestate-no-xfb-stride
VideoCommon: Don't swap on state load when there's no XFB.
  • Loading branch information
Tilka committed Oct 28, 2023
2 parents 7c243a1 + 4f0c8b1 commit 2212a5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Core/VideoCommon/Present.cpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit 2212a5b

Please sign in to comment.