Skip to content
Permalink
Browse files

Merge pull request #8347 from hosaka-corp/frame-advance-alignment

Align frame advance and movies to full field boundaries
  • Loading branch information
JosJuice committed Nov 19, 2019
2 parents dae01b1 + 9c5c3c0 commit d66050375c75ead50894154ee4fd18768d0ba884
Showing with 11 additions and 1 deletion.
  1. +4 −1 Source/Core/Core/Core.cpp
  2. +1 −0 Source/Core/Core/Core.h
  3. +6 −0 Source/Core/Core/HW/VideoInterface.cpp
@@ -856,9 +856,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;
@@ -26,6 +26,7 @@ bool GetIsThrottlerTempDisabled();
void SetIsThrottlerTempDisabled(bool disable);

void Callback_VideoCopiedToXFB(bool video_update);
void FrameUpdate();

enum class State
{
@@ -816,6 +816,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)

0 comments on commit d660503

Please sign in to comment.
You can’t perform that action at this time.