Core: Clarify Callback_VideoCopiedToXFB and FrameUpdate
This commit is contained in:
parent
9a2d8a9623
commit
1a42355f96
|
@ -858,15 +858,15 @@ void VideoThrottle()
|
||||||
|
|
||||||
// --- Callbacks for backends / engine ---
|
// --- Callbacks for backends / engine ---
|
||||||
|
|
||||||
// Should be called from GPU thread when a frame is drawn
|
// Called from Renderer::Swap (GPU thread) when a new (non-duplicate)
|
||||||
void Callback_VideoCopiedToXFB(bool video_update)
|
// 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()`
|
// Called from VideoInterface::Update (CPU thread) at emulated field boundaries
|
||||||
void FrameUpdate()
|
void Callback_NewField()
|
||||||
{
|
{
|
||||||
Movie::FrameUpdate();
|
Movie::FrameUpdate();
|
||||||
if (s_frame_step)
|
if (s_frame_step)
|
||||||
|
|
|
@ -25,8 +25,8 @@ namespace Core
|
||||||
bool GetIsThrottlerTempDisabled();
|
bool GetIsThrottlerTempDisabled();
|
||||||
void SetIsThrottlerTempDisabled(bool disable);
|
void SetIsThrottlerTempDisabled(bool disable);
|
||||||
|
|
||||||
void Callback_VideoCopiedToXFB(bool video_update);
|
void Callback_FramePresented();
|
||||||
void FrameUpdate();
|
void Callback_NewField();
|
||||||
|
|
||||||
enum class State
|
enum class State
|
||||||
{
|
{
|
||||||
|
|
|
@ -820,7 +820,7 @@ void Update(u64 ticks)
|
||||||
// and/or update movie state before dealing with anything else
|
// and/or update movie state before dealing with anything else
|
||||||
|
|
||||||
if (s_half_line_count == 0 || s_half_line_count == GetHalfLinesPerEvenField())
|
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!
|
// If an SI poll is scheduled to happen on this half-line, do it!
|
||||||
|
|
||||||
|
|
|
@ -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.
|
// Remove stale EFB/XFB copies.
|
||||||
g_texture_cache->Cleanup(m_frame_count);
|
g_texture_cache->Cleanup(m_frame_count);
|
||||||
Core::Callback_VideoCopiedToXFB(true);
|
Core::Callback_FramePresented();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle any config changes, this gets propogated to the backend.
|
// Handle any config changes, this gets propogated to the backend.
|
||||||
|
|
Loading…
Reference in New Issue