System: Fix regtest dumping

This commit is contained in:
Stenzek 2024-05-25 15:58:41 +10:00
parent 1565a2667d
commit 60ee17e713
No known key found for this signature in database
4 changed files with 7 additions and 8 deletions

View File

@ -99,8 +99,8 @@ void ResizeDisplayWindow(s32 width, s32 height, float scale);
/// Destroys any active rendering device.
void ReleaseGPUDevice();
/// Called before drawing the OSD and other display elements.
void BeginPresentFrame();
/// Called at the end of the frame, before presentation.
void FrameDone();
namespace Internal {
/// Retrieves the base settings layer. Must call with lock held.

View File

@ -1918,6 +1918,8 @@ void System::FrameDone()
PollDiscordPresence();
#endif
Host::FrameDone();
if (s_frame_step_request)
{
s_frame_step_request = false;
@ -2847,8 +2849,7 @@ void System::UpdateSpeedLimiterState()
g_settings.turbo_speed :
(s_fast_forward_enabled ? g_settings.fast_forward_speed : g_settings.emulation_speed);
s_throttler_enabled = (s_target_speed != 0.0f);
s_optimal_frame_pacing = (s_throttler_enabled && g_settings.display_optimal_frame_pacing) ||
g_gpu_device->GetWindowInfo().IsSurfaceless(); // surfaceless check for regtest
s_optimal_frame_pacing = (s_throttler_enabled && g_settings.display_optimal_frame_pacing);
s_skip_presenting_duplicate_frames = s_throttler_enabled && g_settings.display_skip_presenting_duplicate_frames;
s_pre_frame_sleep = s_optimal_frame_pacing && g_settings.display_pre_frame_sleep;
s_can_sync_to_host = false;
@ -5153,8 +5154,6 @@ void System::HostDisplayResized()
bool System::PresentDisplay(bool skip_present, bool explicit_present)
{
Host::BeginPresentFrame();
// acquire for IO.MousePos.
std::atomic_thread_fence(std::memory_order_acquire);

View File

@ -1770,7 +1770,7 @@ void EmuThread::run()
moveToThread(m_ui_thread);
}
void Host::BeginPresentFrame()
void Host::FrameDone()
{
}

View File

@ -345,7 +345,7 @@ void Host::ReleaseRenderWindow()
//
}
void Host::BeginPresentFrame()
void Host::FrameDone()
{
const u32 frame = System::GetFrameNumber();
if (s_frame_dump_interval > 0 && (s_frame_dump_interval == 1 || (frame % s_frame_dump_interval) == 0))