v3.2.4: fixed dynamic island detection on iOS

This commit is contained in:
Evan Debenham
2025-09-04 10:27:12 -04:00
committed by Evan Debenham
parent c97dec022f
commit 9cf829c694

View File

@@ -77,8 +77,7 @@ public class IOSPlatformSupport extends PlatformSupport {
insets.left = insets.top = insets.right = 0; insets.left = insets.top = insets.right = 0;
} else if (level == INSET_LRG){ } else if (level == INSET_LRG){
//Dynamic Island counts as a 'small cutout', we have to use status bar height to get it =I //Dynamic Island counts as a 'small cutout', we have to use status bar height to get it =I
CGRect statusBarFrame = UIApplication.getSharedApplication().getStatusBarFrame(); double statusBarHeight = insets.top / Gdx.graphics.getBackBufferScale();
double statusBarHeight = Math.min(statusBarFrame.getWidth(), statusBarFrame.getHeight());
if (statusBarHeight >= 51){ //magic number BS for larger status bar caused by island if (statusBarHeight >= 51){ //magic number BS for larger status bar caused by island
insets.left = insets.top = insets.right = 0; insets.left = insets.top = insets.right = 0;
} }