Skip to content

Commit 3bc1fa0

Browse files
Fix safe area regression on older Android versions
1 parent b267c2f commit 3bc1fa0

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)