diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-01-31 00:59:17 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2023-01-31 19:41:24 +1300 |
| commit | 3be63221c7a1003ce6177e823da5ec399cd51015 (patch) | |
| tree | 67a1401165ca60fae43df825ddb9eea3c8bc3159 /Source/Core/VideoCommon/RenderBase.cpp | |
| parent | 3ae78b8e762787a3114baeabec2dd0178562ed1c (diff) | |
Renderer still needs to track swaps for savestates
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 0e8bb41393..e252921c9f 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -365,7 +365,7 @@ void Renderer::OnConfigChanged(u32 bits) UpdateWidescreen(); } -void Renderer::Swap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, u64 ticks) +void Renderer::TrackSwaps(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, u64 ticks) { if (xfb_addr && fb_width && fb_stride && fb_height) { @@ -412,13 +412,14 @@ void Renderer::DoState(PointerWrap& p) if (p.IsReadMode()) { - // Force the next xfb to be displayed. - g_presenter->ClearLastXfbId(); - m_was_orthographically_anamorphic = false; - // And actually display it. - Swap(m_last_xfb_addr, m_last_xfb_width, m_last_xfb_stride, m_last_xfb_height, m_last_xfb_ticks); + // This technically counts as the end of the frame + AfterFrameEvent::Trigger(); + + // re-display the most recent XFB + g_presenter->ImmediateSwap(m_last_xfb_addr, m_last_xfb_width, m_last_xfb_stride, + m_last_xfb_height, m_last_xfb_ticks); } #if defined(HAVE_FFMPEG) |
