summaryrefslogtreecommitdiff
path: root/platform/android/display_server_android.cpp
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2022-04-24 21:12:22 +0200
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2022-04-26 13:51:21 +0200
commit71ce5857ecb76fdca3afc1a0882a575a3879d148 (patch)
tree4bcf19ee57f16ee5e0bf32e6c7516f7bb93fa46e /platform/android/display_server_android.cpp
parentbfc727d9709beea73a1486b47eb745749c3ad0d1 (diff)
Add a method for obtaining display cutouts on Android
Diffstat (limited to 'platform/android/display_server_android.cpp')
-rw-r--r--platform/android/display_server_android.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/android/display_server_android.cpp b/platform/android/display_server_android.cpp
index e7de287fc6..f4487d28f9 100644
--- a/platform/android/display_server_android.cpp
+++ b/platform/android/display_server_android.cpp
@@ -106,6 +106,12 @@ bool DisplayServerAndroid::clipboard_has() const {
}
}
+Array DisplayServerAndroid::get_display_cutouts() const {
+ GodotIOJavaWrapper *godot_io_java = OS_Android::get_singleton()->get_godot_io_java();
+ ERR_FAIL_NULL_V(godot_io_java, Array());
+ return godot_io_java->get_display_cutouts();
+}
+
void DisplayServerAndroid::screen_set_keep_on(bool p_enable) {
GodotJavaWrapper *godot_java = OS_Android::get_singleton()->get_godot_java();
ERR_FAIL_COND(!godot_java);