Skip to content

Commit

Permalink
Finish cleanup of predictive vsync.
Browse files Browse the repository at this point in the history
  • Loading branch information
xwidghet committed Oct 28, 2016
1 parent a77e8b7 commit bc26e1d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/RageDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -969,16 +969,16 @@ void RageDisplay::FrameLimitAfterVsync( int iFPS )
g_LastFrameEndedAtRage.Touch();
return;
}
else if ( g_fFrameLimit.Get() == 0 && g_fFrameLimitGameplay.Get() == 0 )
else if ( !PREFSMAN->m_bVsync.Get() && g_fFrameLimit.Get() == 0 && g_fFrameLimitGameplay.Get() == 0 )
return;

if ( presentFrame )
{
presentFrame = !g_fPredictiveFrameLimit.Get();
presentFrame = false;
g_LastFrameEndedAt = std::chrono::high_resolution_clock::now();
g_FrameExecutionTime = g_LastFrameEndedAt;
}
else if(g_fPredictiveFrameLimit.Get())
else
{
// Get the timings for the game logic loop, render loop, and present time
// Along with how long we are waiting for, e.g. Frame Limiting
Expand Down Expand Up @@ -1017,10 +1017,6 @@ void RageDisplay::FrameLimitAfterVsync( int iFPS )
g_FrameRenderTime = std::chrono::high_resolution_clock::now();
}
}
else
{
presentFrame = true;
}
}

// Both ShouldRenderFrame and ShouldPresentFrame are the same,
Expand Down

0 comments on commit bc26e1d

Please sign in to comment.