Commit Graph

195 Commits

Author SHA1 Message Date
Fredia Huya-Kouadio
a6a5b60235 Additional fixes to the Android get_current_dir() implementation. 2022-09-16 22:45:21 +02:00
bruvzg
1fce7ff540 Fix generation of duplicate locale property list files. 2022-09-16 22:34:51 +02:00
Rémi Verschelde
d4e240f487 Linux: Fix GNU ld detection for pck_embed linker script
(cherry picked from commit fce3602a1e892cbc35fb3aa409bdae835a37be4f)
2022-09-16 22:31:50 +02:00
bruvzg
11cebc25fa Use clang as assembler to ensure preprocessing is done, and add assembler "target" flag.
(cherry picked from commit e87377856174075e38b6d2ca338f28ffa0d9f59f)
2022-09-16 21:44:01 +02:00
bruvzg
b7d732b782 Add arch flag to assembler to fix build on ARM64 macOS / iOS.
(cherry picked from commit b767d2e0fdf835dc181bb21c8be69a35671b60b8)
2022-09-16 21:41:56 +02:00
bcf96a5840 Ported: Improve performance of screen_get_dpi() in Javascript
Replace a bisect with a single multiplication when calling
screen_get_dpi() in Javascript

Tested the value of
window.matchMedia(`(resolution:${(window.devicePixelRatio*96).toFixed(100)}dpi)`).matches
which is true except for values that cause a lot of rounding errors
(e.g. dpr : 0.3  => resolution: 28.799999999999997dpi)

Even in these cases the value matches the result of the previous
`findDPI()` method.
-jamie-pate
562d7c616d
2022-09-16 21:15:54 +02:00
Pedro J. Estébanez
8f26bc61b5 Clean iOS platform config of long gone macro
(cherry picked from commit 8c2a577350924d1f4a8e0a98ebf85bea96ea7e63)
2022-09-16 21:01:17 +02:00
3a99f0afa1 Fix warning. 2022-09-16 19:37:29 +02:00
Fredia Huya-Kouadio
076a1a3253 Fix issue with get_current_dir() returning the wrong path on Android 2022-09-16 19:36:41 +02:00
Nathan Franke
f20e0a9ab4 3.x: ios: force app store icon to be opaque, use proper errors, fix memory leak 2022-09-16 13:08:17 +02:00
e2d42db711 Also renamed the files. 2022-08-19 21:24:36 +02:00
cffe742085 Renamed the VisualServer to RenderringServer like in Godot4, as I think it's a lot better name for it. I did not yet rename the files. 2022-08-19 20:50:20 +02:00
b2e5cd5f2c Fix an another compile error. 2022-08-19 16:54:20 +02:00
c48381b86c Fix javascript build. 2022-08-19 16:23:02 +02:00
bd58e6b989 Fix android build. 2022-08-19 16:21:38 +02:00
58da70524b Ported: Add support for multiple virtual keyboard types - brianwinterpixel
ce24b48e50
2022-08-19 16:18:53 +02:00
56f71c7275 Ported: Refactor the export checking logic to improve separation of concerns - m4gr3d
d2213f76a9
2022-08-19 12:08:35 +02:00
6821dfb26e Ported: Disable threads used to check on plugins to load
The functionality is unavailable on Android (requires export capability) and unnecessarily consumes resources
- m4gr3d
3ac6b6a596
2022-08-19 02:37:43 +02:00
54c49a25a0 Ported: Fix issue preventing the Android Editor from displaying the project content
The issue was causing by a bug within the logic for `FileAccessFilesystemJAndroid#eof_reached()` causing that value to remain false after the eof was reached.
This in turn caused an infinite loop in the file scanner preventing the project's content from showing up.
-m4gr3d
30479543b0
2022-08-19 02:23:57 +02:00
6be9bf5dfe Cleaned up and added the skeleton modification stack implementations to the build. Also smaller fixes. 2022-08-18 15:41:28 +02:00
f8c50f271b Fix include. 2022-08-17 18:12:48 +02:00
9757c39f05 Moved a few more core classes. 2022-08-17 17:43:49 +02:00
99e94b08c4 Moved base input related classes to core/input. 2022-08-17 17:02:24 +02:00
04feb63860 Moved Engine and projectSettings. 2022-08-17 15:35:28 +02:00
be16fe23ad Moved the error macros. 2022-08-17 15:14:19 +02:00
220b2db443 Moved String and related classes under a string folder in core. 2022-08-17 14:19:55 +02:00
dc9cc716c7 Moved Object related classes under core/object. 2022-08-17 13:45:14 +02:00
9555ee56b9 Moved Variant related classes under a variant folder in core. 2022-08-17 13:17:12 +02:00
388b88678e Moved container related classes in core under a new containers directory. 2022-08-17 12:53:49 +02:00
e71e3ed897 Now Vector4, Vector4i, Projection, PoolVector4Array, PoolVector4iArray, are built in variant types. Also reordered the Variant's Type enum, renamed _RID in it to RID, fixed a few smaller issues and removed some very old compat code. 2022-08-16 21:55:56 +02:00
220954cf08 Backported most of the improvements to String from Godot4. 2022-08-15 22:54:03 +02:00
730bce8587 Renamed Quat to Quaternion for consistency with the other engine math classes. 2022-08-13 15:22:33 +02:00
4204828965 Ported: Improve some export error messages. - bruvzg
e0101e511c
2022-08-02 18:01:58 +02:00
Rémi Verschelde
2ca1470010 File: Re-add support to skip CR (\r) in File::get_as_text
This was removed in #63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.

For performance this is done directly in `String::parse_utf8`.

Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR.

Supersedes #63717.

(cherry picked from commit 1418f97c70a5551bdbfeea853cbc479b32ea9e08)
2022-08-02 17:58:32 +02:00
Rémi Verschelde
44c23ae9a5 SCons: Fix X11 use_lld fallback not being applied 2022-08-02 17:58:15 +02:00
a5381e1c18 Fix typo. 2022-08-02 16:29:52 +02:00
7a274ee454 Fix android editor build. 2022-08-02 16:27:43 +02:00
4a39f38bab Fix typo. 2022-07-30 00:54:25 +02:00
641c15f906 Ported: [3.x] HTML5: Add support for Input.vibrate_handheld() - pattlebass
fb7ecc748f
2022-07-30 00:29:14 +02:00
a917d1bed4 Ported: Address remaining scoped storage regressions
- Accelerate common path used to check the storage scope for a given path
- Update the logic for the `get_as_text()` method - previous logic loads the content of a text file one byte at a time
- m4gr3d
fc2c202312
2022-07-29 23:48:31 +02:00
Kevin Smith
3f1e2ac44d Use bigobj for release MSVC builds
Previously it was used only on debug builds, but recent
additions to variant_call.cpp have made that unit too
large even in release_debug.

It was originally set to debug only because using it
breaks mingw, so this only reinstates it for MSVC where
it shouldn't have any drawbacks (famous last words).

Test-Information:
Builds for me with
scons -j 40 platform=windows target=release_debug
and my game then runs from it.

(cherry picked from commit d8900e0020b21d449069ef2a301253371fb70a21)
2022-07-29 23:21:04 +02:00
679f5a7d64 Ported: SCons: Refactor Linux linker options with linker=<bfd|gold|lld|mold>
The new option is `linker` and lets the user specify the argument to
the`-fuse_ld=` linker flag directly. The supported options are:
- `default`: No change, typically uses GNU ld (bfd) unless the user or
  distro picked a different default `/usr/bin/ld`.
- `bfd`: GNU ld from binutils
- `gold`: GNU gold from binutils
- `lld`: lld from LLVM
- `mold`: mold, an extremely fast modern linker, not (yet) intended for
  use in production but great for development speed. Provided by distro
  `mold` package or needs to be compiled from source and installed to
  `/usr` otherwise.
Deprecates the `use_lld=yes` option, and make lld actually usable with
GCC too.
Not all the above are compatible or recommend for LTO, we recommend
using GNU ld with GCC LTO, or lld with LLVM ThinLTO.
- akien-mga
5bb3063eec
2022-07-29 23:18:06 +02:00
Hansem Ro
cedf68bf7f Do case-insensitive search for pen inversion detection 2022-07-29 22:36:49 +02:00
bruvzg
f8be7dd320 Improve OS.set_current_screen
Fix moving fullscreen windows on macOS and Windows
Fix window position on Linux/X11
2022-07-29 21:58:20 +02:00
e7100658d4 Ported: Fix exit code of --help and --version, and test them in CI
Corrects prior regression which caused ERROR output and exit code of 1. - Bromeon
861e155543
2022-07-29 21:45:04 +02:00
8107f6fea6 Fix an another import. 2022-07-29 21:05:20 +02:00
28222d21e5 Ported: HTML5: Make OS.get_locale() match other platforms
- pattlebass
82c3e6229b
2022-07-29 20:54:31 +02:00
Pedro J. Estébanez
8c662ff234 Flush accumulated input events on iOS 2022-07-29 20:51:50 +02:00
17f9583dc0 Fix imports. 2022-07-29 20:33:57 +02:00
88fe196e79 Ported: [3.x, macOS, Windows, X11] Add stylus inverted/eraser support to InputEventMouseMotion event.
- hansemro
193d5c11f3
2022-07-29 20:31:16 +02:00
7ed3705487 Ported: Fix issue causing the Android Editor port to crash when saving a scene
In addition:
- Disable 'adb devices' query (not supported when running the editor on Android devices
- Add `move_to_trash` implementation for Android devices
- m4gr3d
27b63247fd
2022-07-29 20:15:01 +02:00
65b888f597 Fix typo. 2022-07-29 20:01:31 +02:00
64d315631a Added overrides. 2022-07-29 19:46:24 +02:00
6291a6695d Fix typo. 2022-07-29 19:38:24 +02:00
9d76074b58 Ported: Add full support for Android scoped storage.
This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer.
This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
- m4gr3d
24e3b3b88d
2022-07-29 19:24:07 +02:00
baad7f01a0 Ported:Upgrade Android NDK to r23 LTS - madmiraal
061c280873
2022-07-29 18:12:25 +02:00
Wilson E. Alvarez
6e2c670826 Properly check for fullscreen toggle made through the Window Manager 2022-07-29 18:00:18 +02:00
Raffaele Picca
e12997ed02 Fix default cursor in html5 export. 2022-07-29 16:34:04 +02:00
Hugo Locurcio
3edb5e7f2e Fix window maximize error message appearing when starting the web editor
An error message is no longer printed when trying to maximize the window
in HTML5. This behavior is consistent with Android and iOS.
2022-07-29 16:33:04 +02:00
fef163cd57 Ported: Update android:targetSdkVersion from 30 to 31
Starting in August 2022, new apps will need to target API level 31 (Android 12) or higher and adjust for behavioral changes.
Read more here: https://developer.android.com/google/play/requirements/target-sdk
- gumaciel
a38119a746
2022-07-29 12:07:26 +02:00
845d0771b1 Ported: Remove broken scroll gesture on Android - madmiraal
9091309ab7
2022-07-29 11:46:13 +02:00
1e747ac9ba Ported: Ensure joystick has been added or not already removed when processing input.
50bf882fcc
2022-07-29 10:12:37 +02:00
6225d5e6b5 Added missing scripts. 2022-07-29 09:22:06 +02:00
Paweł Fertyk
d5189525b2 Fix set_window_size crash when using NaN
Fixes #60466.
2022-07-29 09:03:02 +02:00
d6e3a9e014 Ported: Migrate the Godot Editor java source file to Kotlin. - m4gr3d
5946b4bdc6
2022-07-29 09:00:31 +02:00
b829fff345 Ported: Ensure Android Java and Kotlin compile to the same version - madmiraal
9f0dba8b65
2022-07-29 08:35:59 +02:00
3659429afd Ported: [macOS, 3.x] Fix unresponsive redraw during live resizing. - bruvzg
e75e1f3231
2022-07-28 18:58:15 +02:00
43131ad4cb Ported: Add readable export errors. Add RTL image vertical alignment support. - bruvzg
f5fa1ca944
2022-07-28 18:40:46 +02:00
d95091efab Ported: Misc editor tweaks and polishes:
- Using a bucketized approach to select the editor scale in order to avoid too high values
- Add default app dimensions: used on Android devices with free floating app windows to set the default app frame
- Add ability to launch the Game window in an adjacent frame when in multi window mode
-m4gr3d
05fc140ee6
2022-07-28 14:14:34 +02:00
5a72ab5669 Ported: Only use Android fullscreen theme for splash screen - madmiraal
caaaef68b4
2022-07-28 13:24:22 +02:00
6de182c670 Ran npm audit fix for the javascript backend. 2022-07-28 11:15:30 +02:00
Rémi Verschelde
ccf7e4374a HTML5: Enable mbedTLS module for Crypto object
Increases the size of the wasm by around 3% (~300-350 KiB).

This enables using the Crypto object for hashing, signing and encryption,
and therefore reduces the gap between the features of the HTML5 platform
and other platforms.

Closes https://github.com/godotengine/godot-proposals/issues/3574.

(cherry picked from commit 3ff6d794c0aac0365f236cd078b5e5aeea0d996e)
2022-07-28 11:13:39 +02:00
Rémi Verschelde
0f9ab62c91 Android: Change export plugin poll to 300 ms
This removes the reliance on the not-so-fully-implemented Power API,
which throws an error in the HTML5 editor.

This was already changed to 200 ms in the master branch, and here I
picked 300 ms to be consistent with the iOS export plugin. All these
thread sleeps need to be re-assessed together to be made more
consistent (and possibly configurable - and most importantly battery
preserving by default).
2022-07-28 11:11:52 +02:00
ed207ab5da Ported: Remove duplicate Android sensor listener registrations - madmiraal
b66b153b8c
2022-07-28 10:08:07 +02:00
92e1759b39 Ported: Fix the logic to restart the Godot application - m4gr3d
b162e7ac39
2022-07-28 10:06:47 +02:00
bruvzg
780e820b67 Remove cached icon earlier, to prevent double free crash on exit. 2022-07-27 23:41:19 +02:00
Hugo Locurcio
c0c4418ce7 Increase compiler optimization when using target=release on iOS/Android
(cherry picked from commit 78b4ec2d4d0d6233ca0f4d8cfeb74640063e970f)
2022-07-27 18:48:04 +02:00
Haoyu Qiu
8790700593 Try to convert OS::execute() output to Unicode on Windows
(cherry picked from commit a71e8081124eaf4eac6059bfeb3550a400bc2002)
2022-07-27 18:41:55 +02:00
bruvzg
e7f9cc8db3 Save and re-apply window icon when changing window style.
(cherry picked from commit b268c4b4bc8a1c246984249b2ce88277df47fe78)
2022-07-27 18:41:32 +02:00
Timo Schwarzer
2f2e3573bd Fix vibration duration on iOS
Fixes #61063
2022-07-27 18:26:32 +02:00
Haoyu Qiu
a29aac105f Swap the meaning of CURSOR_WAIT and CURSOR_BUSY 2022-07-27 18:18:12 +02:00
781902dc4d Ported: [3.x] Fix sign comparison error in platform/osx/os_osx.mm - asmaloney
7c6564ef7e
2022-07-27 15:18:43 +02:00
Marcel Admiraal
24db598946 Read and store joypad events in a separate thread on x11 platform 2022-07-27 15:01:13 +02:00
850a84584d ported: Add OS::is_process_running function.
Adds the is_process_running function to the native OS class and exposes it to script.
This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function.
Documentation is updated to reflect new API function. - mdavisprog
53fb0440d3
I did change it a bit.
2022-07-27 14:46:53 +02:00
Fabio Alessandrelli
b99cb9343d Add flag to disable weak symbols in ZSTD.
Weak symbols are currently broken in upstream emscripten.

(cherry picked from commit 070bd87aaaf7a15ad9d2d839182f14d5c352153b)
2022-07-27 14:35:37 +02:00
f0a6bd5a31 Ported: Added missing signature. - Faless
89c8a8d1dc
2022-07-27 14:35:14 +02:00
5b4d506183 Ported: Fix simulatenous touches for different touch types - Paulo Feodrippe
c46bbdee53
2022-07-27 14:33:08 +02:00
02eef8fc57 Ported: Check for null when retrieving clip data item text on Android - madmiraal
fe60de2c6a
2022-07-27 14:28:26 +02:00
Rémi Verschelde
4ca6458457 Crash handler: Use print_error to include backtrace in logs 2022-07-27 14:25:16 +02:00
bruvzg
127060d953 Fix export plugins after embedded PCK loading changes. 2022-07-27 14:10:05 +02:00
b26a1cd3b4 Ported: [3.x] Improve embedded PCK loading and exporting. - bruvzg
bea7c9be5d
2022-07-27 09:33:39 +02:00
Rémi Verschelde
a0f698d4a6 Linux: Use pkg-config for alsa, libudev and GL too
It's not needed on most distros as those are found in standard lib
and include paths, but on NixOS they're all in non-standard prefixes,
so we need to rely on information provided by pkg-config.

Fixes #59913.

Co-authored-by: David Lewis <davidalewis00@gmail.com>
(cherry picked from commit 07ad0664204fbc965627ed5cba548e93e5af4be7)
2022-07-27 09:03:00 +02:00
8156e2ba36 Ported: Vibrate using iOS haptics engine on supported devices (3.x) - timoschwarzer
8fb9c96df9
2022-07-27 01:23:10 +02:00
720fac314f Fix an another typo. 2022-07-27 00:33:10 +02:00
f3f3d61a94 Fx typo. 2022-07-27 00:25:58 +02:00
f3ec84fa78 Ported: Add a method for obtaining display cutouts on Android - madmiraal
ec2270b88f
2022-07-27 00:21:20 +02:00
e7a5c47f8b Ported: Fix several OS_X11 memory leaks - timothyqiu
95d861694a
2022-07-27 00:04:29 +02:00
634345f152 Ported: Remove duplicate resizable settings - m4gr3d
a3b445d7e8
2022-07-26 12:33:36 +02:00
d14f7d0134 Ported: Update resize settings:
- Unlock resizing for the Godot Editor
- Add an option to specify whether a game is resizeable for the Godot template
- m4gr3d
4ff726b933
2022-07-26 12:25:24 +02:00
Lyuma
3554a0aa81 Keep editor at normal priority on windows.
The multithreaded importer often causes system-wide hangs when importing more than 20 files at a time.
Running the editor at normal priority allows other applications on the system to be responsive during long imports.

(cherry picked from commit ee02a7f785b672304346028bc500949050432fa5)
2022-07-26 11:49:59 +02:00