Browse Source

Fixed crashes in old 32-bit Carbon plugin editor windows when running in macOS Sierra

tags/2021-05-28
hogliux 9 years ago
parent
commit
42b8156cf6
2 changed files with 6 additions and 2 deletions
  1. +5
    -1
      modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm
  2. +1
    -1
      modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm

+ 5
- 1
modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm View File

@@ -2023,7 +2023,11 @@ private:
WindowRef windowRef = HIViewGetWindow (parentHIView);
hostWindow = [[NSWindow alloc] initWithWindowRef: windowRef];
[hostWindow retain];
// not really sure why this is needed in older OS X versions
// but JUCE plug-ins crash without it
if ((SystemStats::getOperatingSystemType() & 0xff) < 12)
[hostWindow retain];
[hostWindow setCanHide: YES];
[hostWindow setReleasedWhenClosed: YES];


+ 1
- 1
modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm View File

@@ -69,7 +69,7 @@ static pascal OSStatus viewBoundsChangedEvent (EventHandlerCallRef, EventRef, vo
static bool shouldManuallyCloseHostWindow()
{
return getHostType().isCubase7orLater() || getHostType().isRenoise();
return getHostType().isCubase7orLater() || getHostType().isRenoise() || ((SystemStats::getOperatingSystemType() & 0xff) >= 12);
}
#endif


Loading…
Cancel
Save