Skip to content

Commit 4ebf67c

Browse files
committed
Merge pull request #109818 from syntaxerror247/safe-area-regression
Fix safe area regression on older Android versions
2 parents 221731f + 3bc1fa0 commit 4ebf67c

File tree

1 file changed

+6
-1
lines changed
  • platform/android/java/lib/src/org/godotengine/godot

1 file changed

+6
-1
lines changed

platform/android/java/lib/src/org/godotengine/godot/GodotIO.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,12 @@ public int[] getDisplaySafeArea() {
225225
}
226226

227227
if (topView != null) {
228-
int insetTypes = WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout();
228+
int insetTypes;
229+
if (godot.isInImmersiveMode()) {
230+
insetTypes = WindowInsetsCompat.Type.displayCutout();
231+
} else {
232+
insetTypes = WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout();
233+
}
229234

230235
if (topView.getRootWindowInsets() != null) {
231236
WindowInsetsCompat insetsCompat = WindowInsetsCompat.toWindowInsetsCompat(topView.getRootWindowInsets(), topView);

0 commit comments

Comments
 (0)