Fix duplicated FPS
This is a small regression from KillRenderer, which caused duplicated frames to be counted on the FPS counter when the "Skip Presenting Duplicated Frames" option was disabled.
This commit is contained in:
parent
95ce41ac56
commit
70cfb46f8e
|
@ -137,6 +137,8 @@ static Common::EventHook s_frame_presented = AfterPresentEvent::Register(
|
||||||
const double last_speed_denominator = g_perf_metrics.GetLastSpeedDenominator();
|
const double last_speed_denominator = g_perf_metrics.GetLastSpeedDenominator();
|
||||||
// The denominator should always be > 0 but if it's not, just return 1
|
// The denominator should always be > 0 but if it's not, just return 1
|
||||||
const double last_speed = last_speed_denominator > 0.0 ? (1.0 / last_speed_denominator) : 1.0;
|
const double last_speed = last_speed_denominator > 0.0 ? (1.0 / last_speed_denominator) : 1.0;
|
||||||
|
|
||||||
|
if (present_info.reason != PresentInfo::PresentReason::VideoInterfaceDuplicate)
|
||||||
Core::Callback_FramePresented(last_speed);
|
Core::Callback_FramePresented(last_speed);
|
||||||
},
|
},
|
||||||
"Core Frame Presented");
|
"Core Frame Presented");
|
||||||
|
|
Loading…
Reference in New Issue