Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Make 'working screenrect' to return the safe area on iOS #7455

Open
wants to merge 1 commit into
base: develop-9.6
Choose a base branch
from

Conversation

livecodepanos
Copy link
Contributor

No description provided.

@livecodepanos livecodepanos changed the title Ios working screenrect 2 [[ WIP ]] Tweak working screenrect to return the safe area on iOS Oct 19, 2020
@livecodepanos
Copy link
Contributor Author

WIP because this results in black screen, even though the correct safe area is reported:

Screenshot 2020-10-19 at 13 14 57

@livecodepanos
Copy link
Contributor Author

Note that the safe area is actually the screen rect excluding the area of the top notch and the bottom area of the soft "home" button:

@livecodepanos
Copy link
Contributor Author

I believe the "black screen" problem is caused because the value of the member variable workarea (of struct MCDisplay) is used in other places in the engine as well, so these places do not like the workarea having the value of the safe area. Or because bool MCScreenDC::platform_getdisplays(bool p_effective, MCDisplay *&r_displays, uint32_t &r_count) is used in several other places apart from MCInterfaceGetScreenRect, and again, these places probably do not like the new value of r_displays[0] -> workarea which is now the safe area.

@livecodepanos
Copy link
Contributor Author

I have pushed some changes that fix the black screen issue. The working screenrect now reports the safe area, at any point it is called (i.e. either on preopenstack or later after the opencard is sent.

Screenshot 2020-10-20 at 15 33 33

@livecodepanos livecodepanos removed the WIP label Oct 20, 2020
@livecodepanos livecodepanos changed the title [[ WIP ]] Tweak working screenrect to return the safe area on iOS Make 'working screenrect' to return the safe area on iOS Oct 20, 2020
@livecodepanos livecodepanos added this to the 9.6.2-rc-1 milestone Oct 27, 2020
@runrevmark runrevmark added the WIP label Oct 28, 2020
@livecodepanos livecodepanos removed this from the 9.6.2-rc-1 milestone Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants