We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4602 - Interface to get safeArea for notched devices (display cutouts) such as iPhone XR?
Summary: Interface to get safeArea for notched devices (display cutouts) such as iPhon...
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: iPhone/iPod touch Windows 10
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-19 17:52 UTC by Dan Ginsburg
Modified: 2019-04-19 17:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Ginsburg 2019-04-19 17:52:22 UTC
Notched devices such as the iPhone X/iPhone XR require applications to not render UI over the "safeArea" such as the notch.  This can be queried from the UIView usinng safeAreaInsets:

https://developer.apple.com/documentation/uikit/uiview/2891103-safeareainsets

It appears to me that Android has a similar API:

https://developer.android.com/guide/topics/display-cutout

Unity exposes this concept via a safeArea:

https://connect.unity.com/p/updating-your-gui-for-the-iphone-x-and-other-notched-devices

Has an interface been considered to add this to SDL?  For now I can workaround it using platform-specific APIs but it seems this is probably a feature that SDL needs for mobile devices.