Skip to content

Commit

Permalink
rsx: fix missing graphics with savestates' "Start Paused" setting
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 committed Oct 29, 2022
1 parent da81f4d commit c7f2cd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions rpcs3/Emu/RSX/RSXThread.cpp
Expand Up @@ -550,7 +550,8 @@ namespace rsx

if (g_cfg.savestate.start_paused)
{
m_pause_on_first_flip = true;
// Allow to render a whole frame within this emulation session so there won't be missing graphics
m_pause_after_x_flips = 2;
}
}

Expand Down Expand Up @@ -2678,10 +2679,9 @@ namespace rsx
{
performance_counters.sampled_frames++;

if (m_pause_on_first_flip)
if (m_pause_after_x_flips && m_pause_after_x_flips-- == 1)
{
Emu.Pause();
m_pause_on_first_flip = false;
}
}

Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/RSX/RSXThread.h
Expand Up @@ -540,8 +540,8 @@ namespace rsx
rsx::profiling_timer m_profiler;
frame_statistics_t m_frame_stats;

// Savestates vrelated
bool m_pause_on_first_flip = false;
// Savestates related
u32 m_pause_after_x_flips = 0;

public:
RsxDmaControl* ctrl = nullptr;
Expand Down

0 comments on commit c7f2cd7

Please sign in to comment.