Browse Source

OSX 10.11: Fixed a CALayer crash

tags/2021-05-28
Tom Poole 5 years ago
parent
commit
473fc357bb
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm

+ 5
- 2
modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm 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));


Loading…
Cancel
Save