Commit Graph

3061 Commits

Author SHA1 Message Date
Will Jordan 925d7d66a4 Fix crash on macOS (AS) when dualshock4 is removed
(cherry picked from commit 283e31a3e2)
2022-07-03 03:51:18 +02:00
Selgesel c3541628c1
[3.x] Release pressed events when the window is blurred on HTML5 platform
(cherry picked from commit c918b4d246)
2021-10-01 07:56:08 +02:00
Rémi Verschelde 74cf62bb68
HTML5: Fix minification error with Emscripten 1.39.9
It used an old vendored version of acorn.js which seems to choke on this
trailing comma. This is not a problem for more recent Emscripten versions.

We disable the `comma-dangle` check in ESLint to prevent this issue.

(cherry picked from commit 23b51a1708)
2021-09-29 09:41:07 +02:00
Kyoz e4df8a68fa
fix(ios): Clipboard get/set missing implement
(cherry picked from commit 6db3e074c5)
2021-09-29 08:57:27 +02:00
Fabio Alessandrelli 41b1f2a7f9
[HTML5] Use browser mix rate by default on the Web.
Browsers doesn't really like forcing the mix rate, e.g. Firefox does not
allow input (microphone) if the mix rate is not the default one, Chrom*
will exhibit worse performances, etc.

(cherry picked from commit b800438efb)
2021-09-29 08:57:26 +02:00
Fabio Alessandrelli addadf92a1
[HTML5] Fix bug in AudioWorklet when reading output buffer.
Would attempt an out of bounds read, causing an exception.

(cherry picked from commit ba08f39e47)
2021-09-29 08:57:25 +02:00
Marcus Brummer 2abf2a6622
Check if vibration duration is > 0 on Android
(cherry picked from commit 47f338fc12)
2021-09-29 08:57:24 +02:00
Hugo Locurcio 2773548b58
Add logo attribution for Android, HTML5 and Linux platform icons
- Tweak the Android platform logo to remove the Android wordmark,
  as it can't be used without explicit permission.

(cherry picked from commit 1513aa9b26)
2021-09-21 14:56:03 +02:00
Rémi Verschelde 052ca31a36
HTML5: Handle GODOT_VERSION_STATUS env var in @GODOT_VERSION@
Follow-up to #51002.

(cherry picked from commit 16f49d4b29)
2021-09-21 14:26:15 +02:00
bruvzg 165775e689
[macOS, Mono] Automatically enable JIT entitlements for the Mono exports.
(cherry picked from commit f37981b83f)
2021-09-16 13:29:53 +02:00
ne0fhyk a9bffd5878
Fix possible null pointer exception.
(cherry picked from commit e2bcdad43b)
2021-08-18 23:27:30 +02:00
Hugo Locurcio 62df64fe58
Fix Xbox controllers in Bluetooth mode on macOS
This prevents the D-pad up arrow from being registered as pressed
when it isn't, and pressing any direction from activating the next
arrow clockwise of it.

Co-authored-by: Scott Wadden <scott.wadden@gmail.com>
(cherry picked from commit f95035b80b)
2021-08-18 23:26:28 +02:00
Fabio Alessandrelli 2e8081cef2
Update Godot Javascript FS library to manually depend on ERRNO_CODES.
Fixes compatibility with Emscripten 2.0.26+.

(cherry picked from commit 71fb2429a0)
2021-08-18 23:24:03 +02:00
Rémi Verschelde 3b65adb00f
Merge pull request #51744 from ModProg/android-right-click-3.3
[3.3] [android] Fixed wrong button mask for right click
2021-08-17 12:49:28 +02:00
ModProg 2667261520 [android] Fixed wrong button mask for right click 2021-08-16 18:14:12 +02:00
Rémi Verschelde f1bf894085
Android: Increase default armv7 NDK platform to 19
Following #50359 this is the new minSdk that we target.
Users can still override it in custom builds if they want to support SDK 18.
2021-08-16 10:12:43 +02:00
ne0fhyk 2eb8875b77
Add partial support for Android scoped storage.
This is done by providing API access to app specific directories which don't have any limitations and allows us to bump the target sdk version to 30.
In addition, we're also bumping the min sdk version to 19 as version 18 is no longer supported by Google Play Services and only account of 0.3% of Android devices.

(cherry picked from commit c88d1608ab)
2021-08-16 09:56:32 +02:00
Fredia Huya-Kouadio 1c8682aa78
Resolve issue where the Godot app remains stuck when resuming.
This was caused by the fact that a new instance of Godot was created at resume while a previous instance already existed.
The previous instance would then go through its cleanup lifecycle, and would thus attempt to close the entire app, leading to the system to restart the app, thus starting the cycle anew.
The fix involves reusing the previous instance of Godot if one is available instead of creating a new one, as well as giving control to the host activity for how the process should be terminated.

(cherry picked from commit 874aa1708f)
2021-08-13 12:17:15 +02:00
Sergey Minakov ed5b7e38ce
[iOS] Use platform generated api to initialize iOS plugins
(cherry picked from commit d48d7cc94f)
2021-08-13 10:36:58 +02:00
Georg Wacker eaf45d4f60
Fix vertical scroll/zoom for precision touchpad
Adds factor data for vertical mousewheel event, in line with horizontal mousewheel event

(cherry picked from commit 63ba15a518)
2021-08-13 10:36:57 +02:00
Hugo Locurcio 5b3f6a6d34
Point at software OpenGL when OpenGL fails to initialize on X11
(cherry picked from commit 8fbdcb6fea)
2021-08-13 10:36:57 +02:00
Rémi Verschelde c717c97819
Windows: Fix build with SCons 4.2.0
(cherry picked from commit c191cfbddf)
2021-08-01 11:06:12 +02:00
Fredia Huya-Kouadio 947c87d717
Fix custom build export
(cherry picked from commit df1ebbb0aa)
2021-07-28 15:40:17 +02:00
ne0fhyk 037a1d4f69
Disable resource optimizations for release builds as it breaks the legacy build system.
(cherry picked from commit d1fdb60ee2)
2021-07-24 01:09:35 +02:00
Sergey Minakov 1e14bd655e
[iOS] Fix plugin configuration loading
Clear ConfigFile parameter before loading new file.
Ignore duplicate input plist keys

(cherry picked from commit aa321f0a24)
2021-07-15 11:54:59 +02:00
Fabio Alessandrelli 1594678ed5
[HTML5] Raise default initial memory to 32 MiB.
The memory was resized in any case during start.

Mitigate Chromium issue:
https://bugs.chromium.org/p/v8/issues/detail?id=11863

Also fix a warning about SAFE_HEAP being a linker only flag.

(cherry picked from commit 897c906ebf)
2021-07-13 17:04:42 +02:00
Marcel Admiraal 54eef268c0
Fix unchecked call to put() warning in GodotInputHandler.java
(cherry picked from commit 8270e101a7)
2021-07-06 16:28:30 +02:00
Marcel Admiraal c43d33fa60
Add GDNative libraries to Android custom Gradle builds
(cherry picked from commit e021cab45b)
2021-06-29 14:59:22 +02:00
bruvzg 9c1580579c
[Windows Export] Use temporary file for osslsigncode signing.
(cherry picked from commit 8f7c2ccefd)
2021-06-29 14:02:57 +02:00
ne0fhyk 9933553268
Update config versions and deprecate the use of the jcenter maven repo.
(cherry picked from commit d1a9363c4c)
2021-06-29 14:02:56 +02:00
bruvzg e5265a9bc3
[macOS] Fix custom mouse cursor not set after mouse mode change.
(cherry picked from commit f7797bf1b3)
2021-06-29 14:02:55 +02:00
ne0fhyk 5ba710863d
Add support for custom debug keystore.
(cherry picked from commit d5b4045ea4)
2021-06-29 13:55:03 +02:00
Marcel Admiraal aeb8cf2d2b
Add adb output to error message when install fails
(cherry picked from commit de2acbd495)
2021-06-29 13:52:25 +02:00
Gromph c652cb62db
UWP: Keep upstream names for capabilities preset settings to avoid mismatch
The previous code used `camelcase_to_underscore` to prettify the names for
display in the export preset, but it leads to inconsistencies if we don't make
sure to do the reverse operation when writing to the `AppxManifest.xml`.

It's simpler to keep the same names as in the manifest, which is also what
users will see referenced in MS documentation.

Fixes #47900.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit c87e49d7bc)
2021-06-29 13:48:55 +02:00
Fabio Alessandrelli 87883f8b0d
[HTML5] Update eslint and jsdoc dependencies.
(cherry picked from commit a1cbb6daa6)
2021-06-17 13:24:44 +02:00
Fabio Alessandrelli 336a381486
[HTML5] Fix some JS library signature.
(cherry picked from commit 9b7b0a28b9)
2021-06-17 13:23:40 +02:00
Marcel Admiraal 286ab2aa5c
Remove FIXME comment from fixed issue in Android Export
(cherry picked from commit 68b1a80a5d)
2021-06-17 13:18:50 +02:00
Arthur Bikmullin ca465ef54d
Fixed missed IDHandler dependency in GodotFetch
(cherry picked from commit ee2bea7a86)
2021-06-08 10:21:08 +02:00
Marcel Admiraal b45fb53896
Update Gradle archiveName and destinationDir properties
(cherry picked from commit 78e791045c)
2021-06-07 22:52:02 +02:00
Nathaniel Morihara a34c0a9248
Exporting: Android Debug Keystore Warnings
(cherry picked from commit 2cf19293ba)
2021-06-03 12:40:28 +02:00
Hugo Locurcio c3f2eb9291
Remove duplicate orientation settings in the iOS export preset
The screen orientation is now sourced from the Project Settings
like it is done for Android already.

(cherry picked from commit 914b5dc525)
2021-05-31 11:27:26 +02:00
Rémi Verschelde 30dfb51048
Linux: Fix embree unbundling on aarch64
Embree supports aarch64 since version 3.13.0.

(cherry picked from commit 752ed768fa)
2021-05-31 11:13:38 +02:00
bruvzg 2c520fb732
[macOS] Allow "on top" windows to enter full-screen mode.
(cherry picked from commit 31be8ae8e9)
2021-05-24 12:59:36 +02:00
Rémi Verschelde 337ef03958
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```

(cherry picked from commit eb78f80f03)
2021-05-20 14:36:39 +02:00
Rémi Verschelde 4ed50733fd
Android: Remove `-fno-integrated-as`, it can break arm64v8 build
We found that this flag causes this error on PR #48812 which does not add any
fancy inline assembly:
```
/tmp/tile_set-ce236a.s: Assembler messages:
/tmp/tile_set-ce236a.s:34676: Error: selected processor does not support `bfc x0,#32,#32'
clang++: error: assembler command failed with exit code 1 (use -v to see invocation)
```

That flag is mentioned in various errors related to assembler failures on
arm64v8 with Clang from the Android NDK.

It was added in Godot in #6958 when migrating from GCC to Clang, and is indeed
referenced in the NDK's Clang migration guide:
https://android.googlesource.com/platform/ndk/+/master/docs/ClangMigration.md

> Especially for ARM and ARM64, Clang is much stricter about assembler rules
> than GCC/GAS. Use `-fno-integrated-as` if Clang reports errors in inline
> assembly or assembly files that you don't wish to modernize.

We don't get those errors nowadays so it seems the flag is no longer needed.

(cherry picked from commit 23f7c75126)
2021-05-19 19:46:43 +02:00
Fabio Alessandrelli af6c50b0e5
[HTML5] Fix GDNative compilation with emcc 2.0.19+
Add `WARN_ON_UNDEFINED_SYMBOLS=0` for the main module (which defines
`godot_js_main` as extern coming from the "side" module, i.e. the main
Godot binary).

(cherry picked from commit 14c057eab6)
2021-05-19 15:22:10 +02:00
Rémi Verschelde 746b9b03dd
CI: Update JavaScript linter deps with known security vulnerabilities
jsdoc has no new release so I'm tracking this PR:
https://github.com/jsdoc/jsdoc/pull/1906

(cherry picked from commit e743b6b24c)
2021-05-13 23:15:19 +02:00
Fabio Alessandrelli 0a7193c5f4
[HTML5] Fix target_fps when window loses focus.
We don't get updates when the window is unfocused/minimized, so we must
detect the situation where the counted ticks start drifting away
resulting in more frames drawn than needed.
This commit adds a check to ensure that the target ticks do not drift
away more than one second.

(cherry picked from commit a1fe6d6899)
2021-05-09 16:28:22 +02:00
Fabio Alessandrelli 88210227dc
[HTML5] Use 64KiB chunk size in JS HTTPClient.
For consistency with the native one, and the documentation.

(cherry picked from commit 6243835619)
2021-05-09 16:23:38 +02:00
Rémi Verschelde 06136d433b
SCons: Add explicit dependencies on thirdparty code in cloned env
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.

(cherry picked from commit c7b53c03ae)
(cherry picked from commit e94161dada)
2021-05-04 12:54:34 +02:00