PR #18675 (commit 96301e9) revealed a problem with how iOS lifecycle
callbacks were handled by Godot. Before that PR it was possible to get
NOTIFICATION_WM_FOCUS_IN callback without getting the corresponding
NOTIFICATION_WM_FOCUS_OUT. That commit added a flag to ensure they are
always coupled, but now there is an issue when, for example, you open a
notification panel on iOS without moving the app to background.
It resulted in view.stopAnimation being called without the
corresponding startAnimation when the app moves to foreground again, so
it looked like the game hanged.
I changed focus out notification to be sent in applicationWillResignActive,
because it makes more sense than to do it in applicationDidEnterBackground,
because it is always called in pair with applicationDidBecomeActive, where
focus in is sent. applicationDidEnterBackground may not come under
circumstances that are now described as a comment in code.
When a phone call or an alarm triggers on iOS, the application receives
an "audio interruption" and it's up to the application to resume
playback when the interruption ends. I added handling for audio
interruptions same as if the game is focused out and then back in.
Starting from April 2018 Apple no longer accepts apps that do not
support iPhone X. For games this mainly means respecting the safe area,
unobstructed by notch and virtual home button. UI controls must be
placed within the safe area so that users can interact with them.
This commit:
- Adds OS::get_window_safe_area method that returns unobscured area of
the window, where interactive controls should be rendered.
- Reorganizes how launch screens are exported - the previous way was
incorrect and modern iPhones did not pick up the correct screens and
because of that used a non-native resolution to render the game.
- Adds launch screen options for iPhone X.
- Makes launch screens optional in the export template. If not
specified, a white screen will be used.
- Adds App Store icon (1024x1024) export option as it now has to be
bundled with the app instead of being provided in iTunes Connect.
- Fixes crash when launching games in iOS Simulator. It happened because
controllerWasConnected callback came before the engine was
initialized. Now in such case the controllers will be queued up and
registered after initialization is done.
- Fixes issue with the virtual keyboard where for some reason
autocorrection panel would intersect with the keyboard itself and not
allow you to use the top row of the keyboard. This is fixed by
disabling autocorrection altogether.
Closes#17358. Fixes#17428. Fixes#17331.
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
- nicely exit if initialisation fails
- fix a few issues around new event handling
- use 16bit single channel framebuffer as 32bit is not supported on iOS
-Changed SectionedPropertyEditor to support this
-Renamed Globals singleton to GlobalConfig, makes more sense.
-Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!