Commit graph

3051 commits

Author SHA1 Message Date
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
Sergey Minakov 2bd40b4c9c
[iOS] Nonnegative start index for virtual keyboard range
(cherry picked from commit 275772818d)
2021-04-30 12:07:57 +02:00
Fabio Alessandrelli e4cbf9c58a
[HTML5] Fix build for recent emscripten versions.
Library suffix should be `.a`, the `EXTRA_` in
`EXTRA_EXPORTED_RUNTIME_METHODS` is deprecated.

(cherry picked from commit b0f6dec02e)
2021-04-30 12:07:04 +02:00
thebestnom 8dc3d5eb7a
[Android] fix generateDevTemplate
(cherry picked from commit 0477256793)
2021-04-30 12:06:39 +02:00
thebestnom 31bc9d859b
[Android] Allow to build dev template with symbols
(cherry picked from commit fd7141fc03)
2021-04-30 12:06:34 +02:00
Rémi Verschelde 46a5f3a18e
Android: Upgrade buildTools from 30.0.1 to 30.0.3
It seems 30.0.1 had issues with compatibility with JDK 8 and 11,
which appear to be solved in 30.0.3 as per godotengine/godot-docs#4796.

(cherry picked from commit d88e1f04df)
2021-04-29 13:06:35 +02:00
Rémi Verschelde feac30b96a
Linux: Remove use_static_cpp override on x86_32
After further testing it seems to work fine now when building binaries with GCC 5
on Ubuntu 16.04 (previously we were using GCC 9 on Ubuntu 14.04).

Follow-up to #45629.

(cherry picked from commit aa15ad72ee)
2021-04-27 13:44:28 +02:00
Rémi Verschelde 5e16b10824
Android: Fix get_buffer false positive on empty dest buffer
Follow-up to #46810, this was missed in #47079 when fixing the issue
for other platforms.

Fixes #48135.

(cherry picked from commit a09f3833bd)
2021-04-23 22:02:34 +02:00
Rémi Verschelde 162c78f9dc
Linux: Don't attempt linking embree3 on non-tools, link it for headless too
`tech_debt++`, that's what we get for not taking the time to cleanup all this
and do it right...

Follow-up to #48073 and #48102.

(cherry picked from commit a14b51df92)
2021-04-23 12:34:27 +02:00
Rémi Verschelde aa84787fb4
lightmapper: Disable build if raycast module can't build
We need to propagate the hacky checks from the raycast config to the
lightmapper config, as the failure of a `can_build()` check is not notified to
other modules (which might even be checked further depending on the processing
order in SConstruct).

A more thorough fix would be to change SConstruct to do two loops on modules:
one to check `can_build()` and disable modules which can't build, then another
one to rechecked `can_build()` with the new lineup and do further config.
But there would be more risk for regressions than with this ad hoc hack.

Similar story for the `platform/x11/detect.py` change... oh my eyes :(

(cherry picked from commit a2c68d9da7)
2021-04-22 19:43:12 +02:00
Rémi Verschelde 66625962bf
embree: Allow building against system library on Linux
(cherry picked from commit b266cc2315)
2021-04-22 18:07:35 +02:00