mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
iOS: Fix screen size detection in plugins
initWithWindowScene appears to create a window with no area if the provided scene is null. As a fallback, creating a window without an associated scene still returns usable bounds.
This commit is contained in:
parent
7a2d7ad013
commit
7bc7dff6f6
1 changed files with 3 additions and 1 deletions
|
|
@ -613,7 +613,9 @@ struct TemporaryWindow
|
||||||
if (@available (ios 13, *))
|
if (@available (ios 13, *))
|
||||||
{
|
{
|
||||||
SharedResourcePointer<WindowSceneTracker> windowSceneTracker;
|
SharedResourcePointer<WindowSceneTracker> windowSceneTracker;
|
||||||
return [[UIWindow alloc] initWithWindowScene: windowSceneTracker->getWindowScene()];
|
|
||||||
|
if (auto* scene = windowSceneTracker->getWindowScene())
|
||||||
|
return [[UIWindow alloc] initWithWindowScene: scene];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [[UIWindow alloc] init];
|
return [[UIWindow alloc] init];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue