1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

OSX 10.11: Fixed a CALayer crash

This commit is contained in:
Tom Poole 2021-01-21 10:04:23 +00:00
parent 748d477a17
commit 473fc357bb

View file

@ -1796,8 +1796,11 @@ private:
// Without setting contentsFormat macOS Big Sur will always set the invalid area
// to be the entire frame.
#if defined (MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12
CALayer* layer = ((NSView*) self).layer;
layer.contentsFormat = kCAContentsFormatRGBA8Uint;
if (NSFoundationVersionNumber > (double) NSFoundationVersionNumber10_11_Max)
{
CALayer* layer = ((NSView*) self).layer;
layer.contentsFormat = kCAContentsFormatRGBA8Uint;
}
#endif
sendSuperclassMessage<void> (self, @selector (viewWillDraw));