Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a method for obtaining display cutouts on Android #60551

Merged
merged 1 commit into from
May 2, 2022

Conversation

madmiraal
Copy link
Contributor

Adds get_display_cutouts method to DisplayServer to return an Array of Rect2 each of which is the bounding rectangle for a display cutout or notch. Display cutouts are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts.

This PR only implements the method for Android. Other platforms will return an empty array.

Closes godotengine/godot-proposals#3466
Supersedes #54290

@akien-mga
Copy link
Member

CC @bruvzg so you can check if the proposed API will be suitable for iOS / macOS notch too (which can be implemented in a follow-up PR).

@bruvzg
Copy link
Member

bruvzg commented Apr 27, 2022

so you can check if the proposed API will be suitable for iOS / macOS notch too (which can be implemented in a follow-up PR).

Yes, Array of Rect2 is suitable for macOS / iOS, but in case of macOS we actually do not need it at all, since default full-screen mode will account for the notch automatically.

@akien-mga akien-mga merged commit bc7ccc9 into godotengine:master May 2, 2022
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add function to get mobile device's notch position and size on iOS (already implemented on Android)
4 participants