Merge pull request #3286 from kinarobin/add-tvos-check-in-target-time-stamp
Add tvos check when use `targetTimestamp` in displaylink
This commit is contained in:
commit
0b59464d7d
|
@ -90,7 +90,7 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
|||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
NSTimeInterval duration = 0;
|
||||
if (@available(iOS 10.0, *)) {
|
||||
if (@available(iOS 10.0, tvOS 10.0, *)) {
|
||||
duration = self.displayLink.targetTimestamp - CACurrentMediaTime();
|
||||
} else {
|
||||
duration = self.displayLink.duration * self.displayLink.frameInterval;
|
||||
|
|
Loading…
Reference in New Issue