diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 5f35ddbb11..6b67897355 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -839,9 +839,12 @@ void Callback_VideoCopiedToXFB(bool video_update) { if (video_update) s_drawn_frame++; +} +// Called at field boundaries in `VideoInterface::Update()` +void FrameUpdate() +{ Movie::FrameUpdate(); - if (s_frame_step) { s_frame_step = false; diff --git a/Source/Core/Core/Core.h b/Source/Core/Core/Core.h index 530079b8ab..d1e11e3026 100644 --- a/Source/Core/Core/Core.h +++ b/Source/Core/Core/Core.h @@ -26,6 +26,7 @@ bool GetIsThrottlerTempDisabled(); void SetIsThrottlerTempDisabled(bool disable); void Callback_VideoCopiedToXFB(bool video_update); +void FrameUpdate(); enum class State { diff --git a/Source/Core/Core/HW/VideoInterface.cpp b/Source/Core/Core/HW/VideoInterface.cpp index 9af6f9f46a..8c60ae10d9 100644 --- a/Source/Core/Core/HW/VideoInterface.cpp +++ b/Source/Core/Core/HW/VideoInterface.cpp @@ -733,6 +733,12 @@ static void EndField() // Run when: When a frame is scanned (progressive/interlace) void Update(u64 ticks) { + // If this half-line is at a field boundary, potentially deal with frame-stepping + // and/or update movie state before dealing with anything else + + if (s_half_line_count == 0 || s_half_line_count == GetHalfLinesPerEvenField()) + Core::FrameUpdate(); + // If an SI poll is scheduled to happen on this half-line, do it! if (s_half_line_of_next_si_poll == s_half_line_count)