mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix safe area regression on older Android versions
This commit is contained in:
parent
b267c2fc6c
commit
3bc1fa0c37
1 changed files with 6 additions and 1 deletions
|
|
@ -225,7 +225,12 @@ public class GodotIO {
|
|||
}
|
||||
|
||||
if (topView != null) {
|
||||
int insetTypes = WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout();
|
||||
int insetTypes;
|
||||
if (godot.isInImmersiveMode()) {
|
||||
insetTypes = WindowInsetsCompat.Type.displayCutout();
|
||||
} else {
|
||||
insetTypes = WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout();
|
||||
}
|
||||
|
||||
if (topView.getRootWindowInsets() != null) {
|
||||
WindowInsetsCompat insetsCompat = WindowInsetsCompat.toWindowInsetsCompat(topView.getRootWindowInsets(), topView);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue