From August 1, 2019, Google Play requires that all new apps and app updates
include 64-bit versions, so we enable ARM64 by default.
IINM support for x86 and x86_64 is still be optional, so not enabling them
out of the box.
Part of #25030.
(cherry picked from commit 9e820cdf20)
Like arm64v8, this is only supported by API 21 and later,
so we enforce 21 as min API for x86_64.
Part of #25030.
(cherry picked from commit 7f4ee36469)
This fixes exporting the NvOptimusEnablement export when building with
MingW. This also adds the equivalent for AMD.
This fixes#23400
(cherry picked from commit 19d91f788d)
The code in pre.js and engine.js is a bit confusing to see in isolation,
since the files aren't valid JS files by themselves. This just adds some
explanatory text to both files.
Fixes#22937.
(cherry picked from commit 61d5513525)
Initialized the PID to -2, which will be the value returns in blocking-
mode where the PID is not available. (-1 was already taken to signify an
execution failure).
OS::execute will now properly return a non-OK error code when it fails
to execute the target file.
The documentation was rewritten to be very clear about the differences
between blocking and non-blocking mode.
Fixes#19056.
(cherry picked from commit f392650be2)
Instead of editing the placeholder permissions actually write new ones.
This should solve the privacy statement problems for the Play store.
This means we also no longer need to placeholder permissions in the
template.
(cherry picked from commit 2a126242dd)
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.
(cherry picked from commit 08a924bcee)
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.
(cherry picked from commit 96301e934d)
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*)
The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers.
Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse.
*: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest.
On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction.
Plus: Improve/fix tracking of current mouse position.
Input source types are not pure bit flags, they are combinations of
flags, so != 0 check was incorrect and resulted in crashes later, when
trying to obtain the device.
(cherry picked from commit 5dffa506dc)
It is possible that input comes before the engine is fully initialized.
This fixes the crashes that ocurred when that happens.
(cherry picked from commit 995724b762)