mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
Adjust iOS frame start times to match the platform info (#11802)
This commit is contained in:
@@ -114,7 +114,8 @@ float VsyncWaiterIOS::GetDisplayRefreshRate() const {
|
||||
}
|
||||
|
||||
- (void)onDisplayLink:(CADisplayLink*)link {
|
||||
fml::TimePoint frame_start_time = fml::TimePoint::Now();
|
||||
CFTimeInterval delay = CACurrentMediaTime() - link.timestamp;
|
||||
fml::TimePoint frame_start_time = fml::TimePoint::Now() - fml::TimeDelta::FromSecondsF(delay);
|
||||
fml::TimePoint frame_target_time = frame_start_time + fml::TimeDelta::FromSecondsF(link.duration);
|
||||
|
||||
display_link_.get().paused = YES;
|
||||
|
||||
Reference in New Issue
Block a user