mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AUv3: Fix an issue in detecting the available screen user area
On at least iOS 26 using a temporary window frame is unreliable. This change tries to use an existing window for any non-standalone app. It also updates the details on any changes, such as when the device orientation changes.
This commit is contained in:
parent
32b4423ca8
commit
88af872d4d
8 changed files with 81 additions and 37 deletions
|
|
@ -1896,6 +1896,8 @@ public:
|
|||
{
|
||||
JUCE_ASSERT_MESSAGE_THREAD
|
||||
|
||||
refreshDisplays();
|
||||
|
||||
if (auto p = createPluginFilterOfType (AudioProcessor::wrapperType_AudioUnitv3))
|
||||
{
|
||||
processorHolder = new AudioProcessorHolder (std::move (p));
|
||||
|
|
@ -1932,6 +1934,8 @@ public:
|
|||
|
||||
void viewDidLayoutSubviews()
|
||||
{
|
||||
refreshDisplays();
|
||||
|
||||
if (auto holder = processorHolder.get())
|
||||
{
|
||||
if ([myself view] != nullptr)
|
||||
|
|
@ -2002,6 +2006,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
static void refreshDisplays() { const_cast<Displays&> (Desktop::getInstance().getDisplays()).refresh(); }
|
||||
|
||||
// There's a chance that createAudioUnit will be called from a background
|
||||
// thread while the processorHolder is being updated on the main thread.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue