Implement OS.get_window_safe_area() for Android

This commit is contained in:
Mark Riedesel
2020-10-26 15:07:54 -04:00
parent 7c27e37997
commit 2bec10fd1c
6 changed files with 50 additions and 0 deletions

View File

@ -291,6 +291,12 @@ Size2 OS_Android::get_window_size() const {
return Vector2(default_videomode.width, default_videomode.height);
}
Rect2 OS_Android::get_window_safe_area() const {
int xywh[4];
godot_io_java->get_window_safe_area(xywh);
return Rect2(xywh[0], xywh[1], xywh[2], xywh[3]);
}
String OS_Android::get_name() const {
return "Android";