diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 2133ee04c8..4644df5689 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -858,15 +858,15 @@ void VideoThrottle() // --- Callbacks for backends / engine --- -// Should be called from GPU thread when a frame is drawn -void Callback_VideoCopiedToXFB(bool video_update) +// Called from Renderer::Swap (GPU thread) when a new (non-duplicate) +// frame is presented to the host screen +void Callback_FramePresented() { - if (video_update) - s_drawn_frame++; + s_drawn_frame++; } -// Called at field boundaries in `VideoInterface::Update()` -void FrameUpdate() +// Called from VideoInterface::Update (CPU thread) at emulated field boundaries +void Callback_NewField() { Movie::FrameUpdate(); if (s_frame_step) diff --git a/Source/Core/Core/Core.h b/Source/Core/Core/Core.h index b2a2b4e3d9..08d9b7a27d 100644 --- a/Source/Core/Core/Core.h +++ b/Source/Core/Core/Core.h @@ -25,8 +25,8 @@ namespace Core bool GetIsThrottlerTempDisabled(); void SetIsThrottlerTempDisabled(bool disable); -void Callback_VideoCopiedToXFB(bool video_update); -void FrameUpdate(); +void Callback_FramePresented(); +void Callback_NewField(); enum class State { diff --git a/Source/Core/Core/HW/VideoInterface.cpp b/Source/Core/Core/HW/VideoInterface.cpp index a3837202b1..b3a6ed90d0 100644 --- a/Source/Core/Core/HW/VideoInterface.cpp +++ b/Source/Core/Core/HW/VideoInterface.cpp @@ -820,7 +820,7 @@ void Update(u64 ticks) // and/or update movie state before dealing with anything else if (s_half_line_count == 0 || s_half_line_count == GetHalfLinesPerEvenField()) - Core::FrameUpdate(); + Core::Callback_NewField(); // If an SI poll is scheduled to happen on this half-line, do it! diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 03e277d563..92b74cdb07 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -1283,7 +1283,7 @@ void Renderer::Swap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, u6 { // Remove stale EFB/XFB copies. g_texture_cache->Cleanup(m_frame_count); - Core::Callback_VideoCopiedToXFB(true); + Core::Callback_FramePresented(); } // Handle any config changes, this gets propogated to the backend.