Merge pull request #11624 from phire/fix_duplicate_fps

Fix duplicated FPS
This commit is contained in:
Scott Mansell 2023-03-05 23:50:55 +13:00 committed by GitHub
commit cecf2d25d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -137,7 +137,9 @@ static Common::EventHook s_frame_presented = AfterPresentEvent::Register(
const double last_speed_denominator = g_perf_metrics.GetLastSpeedDenominator();
// 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;
Core::Callback_FramePresented(last_speed);
if (present_info.reason != PresentInfo::PresentReason::VideoInterfaceDuplicate)
Core::Callback_FramePresented(last_speed);
},
"Core Frame Presented");