Fix the animated image view refresh rate issue when connecting a external monitor with different refresh rate

This commit is contained in:
DreamPiggy 2019-03-30 18:55:07 +08:00
parent 8237712d36
commit 3c28785d76
1 changed files with 1 additions and 2 deletions

View File

@ -281,8 +281,7 @@ static NSUInteger SDDeviceFreeMemory() {
- (CVDisplayLinkRef)displayLink - (CVDisplayLinkRef)displayLink
{ {
if (!_displayLink) { if (!_displayLink) {
CGDirectDisplayID displayID = CGMainDisplayID(); CVReturn error = CVDisplayLinkCreateWithActiveCGDisplays(&_displayLink);
CVReturn error = CVDisplayLinkCreateWithCGDisplay(displayID, &_displayLink);
if (error) { if (error) {
return NULL; return NULL;
} }