1
0
Fork 0
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:
Anthony Nicholls 2025-10-06 10:56:14 +01:00 committed by Anthony Nicholls
parent 32b4423ca8
commit 88af872d4d
8 changed files with 81 additions and 37 deletions

View file

@ -2849,7 +2849,7 @@ DECLARE_JNI_CLASS (AndroidDisplayMetrics, "android/util/DisplayMetrics")
#undef JNI_CLASS_MEMBERS
//==============================================================================
void Displays::findDisplays (float masterScale)
void Displays::findDisplays (const Desktop& desktop)
{
auto* env = getEnv();
@ -2865,7 +2865,7 @@ void Displays::findDisplays (float masterScale)
d.scale = env->GetFloatField (displayMetrics, AndroidDisplayMetrics.density);
d.dpi = (d.scale * 160.f);
d.scale *= masterScale;
d.scale *= desktop.getGlobalScaleFactor();
d.totalArea = Rectangle<int> (env->GetIntField (displayMetrics, AndroidDisplayMetrics.widthPixels),
env->GetIntField (displayMetrics, AndroidDisplayMetrics.heightPixels)) / d.scale;