Commit Graph

1691 Commits

Author SHA1 Message Date
Juan Linietsky 10a71ab4d6 Added missing support for traditional chinese on Windows, fixes #7674
(cherry picked from commit e896261b87)
2018-11-28 10:27:41 +01:00
Zaven Muradyan 27f606db1b Add comments to javascript wrapper parts.
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)
2018-11-01 11:39:27 +01:00
M. Huri e6ae704f32 Repaired mistyped of 'its' on several files.
(cherry picked from commit b46ba24e3b)
2018-11-01 11:39:26 +01:00
Rémi Verschelde 80e66a6214 Improve return value of OS.execute in blocking/non-blocking variants
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)
2018-11-01 11:39:20 +01:00
Wojciech Milkowski 74fe5968c1 Fix build with Android NDK r18
As a bonus there is no need to use undocumented Gradle API any more.

(cherry picked from commit 3598165c4d)
2018-10-15 16:27:40 +02:00
Wojciech Milkowski 8c714bf8cd No need to link with libandroid_support in NDK 17
According to https://github.com/bytedeco/javacpp/pull/244 in NDK 17
libandroid_support library is not needed any more, and on armv8 is
already gone which breaks compilation.

(cherry picked from commit 3a3ea6d514)
2018-10-09 09:23:19 +02:00
Ridwan Abdul Hafidh d3ca68aee4 add support libc++_shared stl on android
(cherry picked from commit b0419db46f)
2018-10-09 09:23:03 +02:00
Tiago Quendera a063074346 Update detect.py
Fixed a typo in detect.py

(cherry picked from commit aa594614db)
2018-10-09 09:20:31 +02:00
Konstantin Zaitsev c00c3f10a4 Fix possible NullPointerException crash on cancel payment
(cherry picked from commit d05db4de8e)
2018-07-28 16:06:30 +02:00
Pedro J. Estébanez bc2ee93758 Fix touch issues on Windows
(cherry picked from commit 2f161ffd4f)
2018-07-27 17:14:22 +02:00
Rémi Verschelde c709dff1a2 Style: Format code with clang-format 6.0.1
(cherry picked from commit 7c9f7452f4)

Travis: Update style checks to clang-format 6.0.1

(cherry picked from commit 003ac67df1)
2018-07-18 16:37:23 +02:00
Hein-Pieter van Braam 861d341dff Write new permissions to the AndroidManifest.xml
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)
2018-07-08 15:48:08 +02:00
Patrick Kaster 9190ae2be7 added 'android_add_asset_dir('...') method to Android module gradle build config 2018-07-04 23:04:14 +02:00
Hugo Locurcio 403f7dc35f Change ".." punctuation for "..." in editor strings (#16507)
(cherry picked from commit 1c419531a0)
2018-06-05 21:42:33 +02:00
Max Hilbrunner e29800ea7b Javascript: Remove weird log
(cherry picked from commit 0c56e011ad)
2018-06-01 18:00:51 +02:00
Dmitry Pupinin 188bfd2ac9 Increase versionCode range 3.0
(cherry picked from commit d71d968987)
2018-06-01 17:33:27 +02:00
Hein-Pieter van Braam 6635f2a108 Add back missing method from e10a2e5999 2018-05-14 00:25:34 +02:00
Hein-Pieter van Braam faceb5b75d Implement pull/18665 for 3.0
Windows detect.py: Detect missing WindowsSdkDir
2018-05-13 22:32:01 +02:00
Leon Krause 868c44b239 Fix keyboard focus lock-out with HTML5 canvas in iframe
(cherry picked from commit 9080e96bc8)
2018-05-13 22:17:53 +02:00
Hein-Pieter van Braam 41bb321962 For uwp the ARM architecture needs to be in lower case
(cherry picked from commit 07f590046a)
2018-05-13 21:58:37 +02:00
Leon Krause 66c0be642f Fix relative mouse motion when captured in HTML5 platform
(cherry picked from commit d78b10313b)
2018-05-13 21:52:14 +02:00
Guilherme Felipe 2fa54c1df6 Fix custom cursor disappearing on osx
(cherry picked from commit 48f9e6a05b)
2018-05-13 21:51:25 +02:00
Ruslan Mustakov 7e09206e5c Proper focus in/out handling on iOS
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)
2018-05-13 21:46:57 +02:00
Ruslan Mustakov ecb4c4268c Resume audio on iOS after phone call or alarm
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)
2018-05-13 21:46:53 +02:00
Hein-Pieter van Braam 5917063192
Merge pull request #18082 from RandomShaper/improve-gui-touch-3.0
Implement universal translation of touch to mouse (3.0)
2018-05-13 21:30:37 +02:00
Rémi Verschelde 1905e1c8a2 Android: Increase targetSdkVersion to 27
Matches the change for 2.1 in #18626, and the new requirements from Google
for new apps starting with August 2018 (targetSdkVersion 26 or higher):
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html

(cherry picked from commit a6552819b1)
2018-05-08 15:30:11 +02:00
RameshRavone fa19d01c7b Fix: JAR files signed with the MD5 algorithm as unsigned
(cherry picked from commit d3182248c4)
2018-05-08 09:06:54 +02:00
Pedro J. Estébanez e10a2e5999 Implement universal translation of touch to mouse
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.
2018-04-30 19:04:35 +02:00
Ignacio Etcheverry 00c55bb2eb Fix _export_begin not being called when exporting to android
(cherry picked from commit c8884ce3bd)
2018-04-29 18:45:09 +02:00
Marcelo Fernandez e7837828f6 Improved error checking at EditorExportPlatformPC::export_project
(cherry picked from commit 0876502f72)
2018-04-29 15:12:21 +02:00
Leon Krause c968c787e5 Disable Emscripten assertions in release_debug builds
The messages generated by some assertions can be confusing to users.

(cherry picked from commit d6c9d8d778)
2018-04-29 15:01:29 +02:00
Fabio Alessandrelli 66b36235c9 Fix IPhone and OSX cross compilation
(cherry picked from commit e7b9e2f970)
2018-04-29 14:46:03 +02:00
Ruslan Mustakov 4eed7cb9b2 Fix Android input source checks
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)
2018-04-28 22:50:25 +02:00
Igors Vaitkus 6989a7ac53 Fix UpdatePowerInfo method implementation in PowerIphone class
(cherry picked from commit 06fab24348)
2018-04-28 20:11:49 +02:00
Fabio Alessandrelli 5e70e4469a Fix bug in HTML5 HTTPClient.
The URL parameter already has a slash, adding an extra one results in
an invalid resource path

(cherry picked from commit b8c73b195f)
2018-04-28 20:01:35 +02:00
Ruslan Mustakov c8d0d38cab Add safety checks when handling Android input
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)
2018-04-28 19:58:00 +02:00
Leon Krause d3ffc8ad0c Fix engine.js startGame() when loading from directory
(cherry picked from commit 3014e48ec5)
2018-04-28 19:54:29 +02:00
Leon Krause 393e1ef4ee Allow custom path when using engine.js preloadFile() with URL
(cherry picked from commit d373029382)
2018-04-28 19:54:19 +02:00
Leon Krause 78b44eab0a Fix engine.js preloadFile() with directories
(cherry picked from commit 6f1bddf4b5)
2018-04-28 19:54:12 +02:00
Leon Krause 0f6626977b Expose Emscripten libs to engine.js discreetly
(cherry picked from commit 63c7fc6358)
2018-04-28 19:54:00 +02:00
bruvzg de66976ff0 Fix dragging window from non-retina to retina display.
(cherry picked from commit 14597dc2b2)
2018-04-28 17:51:11 +02:00
Marcelo Fernandez 9a21f964ba Added new audio device functions to set/get the audio device
(cherry picked from commit ecc1b34cbc)
2018-04-14 21:42:44 +02:00
bruvzg ce1b62a01f Explicitly set OpenGL profile to core (X11, Windows).
Enable GLES2 on Windows.

(cherry picked from commit ad67911f1a)
2018-04-14 20:56:49 +02:00
Ruslan Mustakov 99cf2ffb19 iPhone X support and iOS-related fixes
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.

(cherry picked from commit 1d9a3a9b1c)
2018-04-14 20:17:47 +02:00
Pedro J. Estébanez 4f0b5f7307 Implement always-on-top for MacOS
Courtesy of @bruvzg.

(cherry picked from commit 2e8c7824c0)
2018-04-14 19:04:13 +02:00
Pedro J. Estébanez 1c25e50490 Add new window setting: always on top
Implemented for Windows and Linux.

(cherry picked from commit ee2c31d306)
2018-04-14 19:03:53 +02:00
volzhs b09d06fcf7 Fix getting Android device information
Fix #17644

(cherry picked from commit 4e378aeeb8)
2018-03-29 00:34:31 +02:00
Xavier Sellier fa9e03996c Prevent android to split-screen
(cherry picked from commit 61e8f8a866)
2018-03-29 00:19:49 +02:00
Marcelo Fernandez 8289f8628d Modify OSX can_export logic to match the logic from EditorExportPlatformPC::can_export
(cherry picked from commit a42dfd7882)
2018-03-28 23:47:22 +02:00
bruvzg d8a0b6ba63 Hack to force macOS window activation for non-bundled app.
(cherry picked from commit 506e17ee70)
2018-03-28 23:39:16 +02:00