Skip to content

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Nustat0 authored Dec 26, 2024
1 parent cde727c commit d55155a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/framerate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2639,6 +2639,7 @@ SK::Framerate::Limiter::wait (void)
bool bIsPreRenderLimit1 =
config.render.framerate.pre_render_limit == 1;

double dVariation = 0.0;
bool bHighVariation = [&]() -> bool
{
bool bIgnoreHighVariation =
Expand Down Expand Up @@ -2676,7 +2677,9 @@ SK::Framerate::Limiter::wait (void)
}
}

return (double)max - (double)min > 1.0;
dVariation = (double)max - (double)min;

return dVariation > 1.0;
}();

bool bHighRenderLatency = [&]() -> bool
Expand Down Expand Up @@ -2917,7 +2920,9 @@ SK::Framerate::Limiter::wait (void)
{
bool bStopWait =
bIsTearingModeAdaptiveOff &&
!bIsTrueFullscreen;
!bIsTrueFullscreen &&
dVariation >
latency_avg.getMaxInput ();

if (! bIsNewACTION)
{
Expand Down

0 comments on commit d55155a

Please sign in to comment.