1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-29 12:50:28 +00:00

Merge pull request #1308 from ryandesign/no-preferredDevice

Fix color video performance on macOS 10.15+
This commit is contained in:
Thomas Harte 2024-01-17 09:23:49 -05:00 committed by GitHub
commit 20c1f4f0e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,12 +145,7 @@ static CVReturn DisplayLinkCallback(__unused CVDisplayLinkRef displayLink, const
} }
- (void)awakeFromNib { - (void)awakeFromNib {
// Use the preferred device if available. self.device = MTLCreateSystemDefaultDevice();
if(@available(macOS 10.15, *)) {
self.device = self.preferredDevice;
} else {
self.device = MTLCreateSystemDefaultDevice();
}
// Configure for explicit drawing. // Configure for explicit drawing.
self.paused = YES; self.paused = YES;