1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +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:
reuk 2025-09-02 13:17:59 +01:00
parent 7a2d7ad013
commit 7bc7dff6f6
No known key found for this signature in database

View file

@ -613,7 +613,9 @@ struct TemporaryWindow
if (@available (ios 13, *))
{
SharedResourcePointer<WindowSceneTracker> windowSceneTracker;
return [[UIWindow alloc] initWithWindowScene: windowSceneTracker->getWindowScene()];
if (auto* scene = windowSceneTracker->getWindowScene())
return [[UIWindow alloc] initWithWindowScene: scene];
}
return [[UIWindow alloc] init];