Commit Graph

3459 Commits

Author SHA1 Message Date
Rémi Verschelde 8388ea1d6b
Merge pull request #64839 from akien-mga/3.x-zstd-1.5.2
zstd: Update to upstream version 1.5.2
2022-08-25 00:51:28 +02:00
bruvzg c4885c8be8 Use clang as assembler to ensure preprocessing is done, and add assembler "target" flag.
(cherry picked from commit e873778561)
2022-08-24 18:26:29 +02:00
bruvzg b7c9eb1a3c Add arch flag to assembler to fix build on ARM64 macOS / iOS.
(cherry picked from commit b767d2e0fd)
2022-08-24 18:26:28 +02:00
Jamie Pate 562d7c616d 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.

See also:

6cff589b5b (r81273660)
(cherry picked from commit c2e3971013)
2022-08-24 17:16:33 +02:00
Pedro J. Estébanez 0876491983 Clean iOS platform config of long gone macro
(cherry picked from commit 8c2a577350)
2022-08-24 17:13:21 +02:00
Fredia Huya-Kouadio b5e1096c61 Fix issue with `get_current_dir()` returning the wrong path on Android 2022-08-19 20:32:55 -07:00
Fredia Huya-Kouadio 989d5990ad
Merge pull request #64420 from m4gr3d/investigate_read_write_access_loss_3x
[3.x] Fix issue preventing the Android Editor from displaying the project content
2022-08-15 13:19:01 -07:00
Fredia Huya-Kouadio 3ac6b6a596 Disable threads used to check on plugins to load
The functionality is unavailable on Android (requires export capability) and unnecessarily consumes resources
2022-08-15 02:30:08 -07:00
Fredia Huya-Kouadio 30479543b0 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.
2022-08-15 02:21:34 -07:00
Fredia Huya-Kouadio ef44e63f22 Fix GodotTTS native initialization 2022-08-14 22:01:31 -07:00
Fredia Huya-Kouadio d2213f76a9 Refactor the export checking logic to improve separation of concerns 2022-08-14 08:47:09 -07:00
Sergey Minakov e8035ffe84 [iOS] Extend iOS plugins to support Swift runtime 2022-08-09 20:19:12 +03:00
Rémi Verschelde 6eee83579a
Merge pull request #64101 from timothyqiu/subsecond 2022-08-08 16:31:49 +02:00
Rémi Verschelde 8cc8127bb1
Merge pull request #62886 from madmiraal/fix-59931-3.x 2022-08-08 15:54:39 +02:00
Rémi Verschelde 7dc8ec0c61
Merge pull request #63643 from aaronfranke/3.x-mouse-mode-ch 2022-08-08 14:36:45 +02:00
Haoyu Qiu 1be078ebcb Fix Time.get_unix_time_from_system() not including msecs 2022-08-08 20:31:51 +08:00
bruvzg 8147f04db6
[Linux] Disable speech-dispatcher, pulseaudio and udev wrapper builds, when library is not found. 2022-08-06 11:54:20 +03:00
Rémi Verschelde 0bed7ea63f
Merge pull request #61316 from bruvzg/tts_3x
[3.x] Backport text-to-speech support.
2022-08-05 23:45:51 +02:00
Rémi Verschelde 26762a71b6
Merge pull request #58537 from winterpixelgames/feature/virtual-keyboard-types-3.x 2022-08-05 19:37:13 +02:00
bruvzg e0101e511c Improve some export error messages.
(cherry picked from commit ea00cf7270)
2022-08-01 10:37:04 +02:00
Rémi Verschelde 751b16a285 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 1418f97c70)
2022-08-01 00:40:55 +02:00
Rémi Verschelde 10e8a25ce7 SCons: Fix X11 `use_lld` fallback not being applied 2022-07-31 13:49:12 +02:00
Aaron Franke 0d6e2d1090
Add MOUSE_MODE_CONFINED_HIDDEN to MouseMode enum 2022-07-29 13:46:04 -05:00
pattlebass fb7ecc748f [3.x] HTML5: Add support for `Input.vibrate_handheld()` 2022-07-28 13:20:05 +03:00
Rémi Verschelde 6c8d9b8401
Merge pull request #63480 from m4gr3d/fix_remaining_scoped_storage_regressions_3x
[3.x] Address remaining scoped storage regressions
2022-07-26 18:15:14 +02:00
Fredia Huya-Kouadio fc2c202312 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
2022-07-26 07:42:49 -07:00
Kevin Smith 01cfcab5c6 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 d8900e0020)
2022-07-26 11:01:55 +02:00
Rémi Verschelde 818f1eed31 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 14:53:37 +02:00
Pedro J. Estébanez a0448f1d5e Flush buffered input events on UWP
(cherry picked from commit b53d032fb8)
2022-07-25 11:44:36 +02:00
Rémi Verschelde 364071c2c4
Merge pull request #63283 from akien-mga/3.x-scons-linux-refactor-linker 2022-07-22 11:40:29 +02:00
Hansem Ro a36902f2c1 [3.x, X11] Do case-insensitive search for pen inversion detection 2022-07-21 19:25:39 -07:00
Rémi Verschelde 5bb3063eec 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.

(cherry picked from commit 534f85add1daec0669a1f18edd2cc456f9a296ef)
2022-07-22 01:03:31 +02:00
bruvzg 108dcf3bf0
Improve OS.set_current_screen
Fix moving fullscreen windows on macOS and Windows
Fix window position on Linux/X11
2022-07-19 12:23:52 +03:00
pattlebass 82c3e6229b HTML5: Make `OS.get_locale()` match other platforms
Fixes #63029.

(cherry picked from commit d57a76c809)
2022-07-15 23:25:01 +02:00
Rémi Verschelde 101cbe5d5b
Merge pull request #62723 from hansemro/eraser-detect-3.x 2022-07-15 00:13:15 +02:00
Marcel Admiraal 2f7de4c8ed Fix incorrect Android scancodes 2022-07-13 16:24:37 +01:00
Pedro J. Estébanez 0348fa2640 Flush accumulated input events on iOS 2022-07-08 20:01:19 +02:00
Jan Haller 861e155543 Fix exit code of --help and --version, and test them in CI
Corrects prior regression which caused ERROR output and exit code of 1.

(cherry picked from commit d38d76d039)
2022-07-08 14:54:16 +02:00
Brian Semrau ce24b48e50 Add support for multiple virtual keyboard types 2022-07-07 14:22:28 -04:00
Fredia Huya-Kouadio 27b63247fd 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
2022-07-05 02:59:52 -07:00
Hansem Ro 193d5c11f3 [3.x, macOS, Windows, X11] Add stylus inverted/eraser support to InputEventMouseMotion event 2022-07-04 16:12:11 -07:00
Fredia Huya-Kouadio 0abc4ad129 Fix the directory copy bug issue
The issue was caused by a logic bug causing end of file to be reported for empty files.
2022-07-04 12:56:53 -07:00
Rémi Verschelde f089f77c2a Android: Refactor Custom Build options in export preset
Instead of reusing the custom_template/ prefix which is actually only
used for the prebuilt APK workflow, we add a new custom_build/ prefix.

This is a slight compat breakage (users will have to redo their config)
but enables us to group the Min SDK and Target SDK options where they make
sense, and avoid reusing the previously hardcoded Target SDK 30 from
Godot 3.4.

Those two options are now strings instead of integers so that we can keep
them empty by default, and show their default value using a placeholder.
So some validation has been added to make sure they are proper ints.
The upper bound on Target SDK was also removed as it's a common use case
to use it to try to target newer released SDKs. But we warn the user that
this wasn't validated by us.

The export info dialog is now exclusive so that when it doesn't auto-close,
i.e. when it errors, you don't close it by mistake by clicking outside.

Fixes #62465.
2022-07-03 17:09:41 +02:00
Raffaele Picca 3f8830ec50 Fix default cursor in html5 export. 2022-07-01 20:46:58 +02:00
bruvzg 6489fe890e
Backport text-to-speech support. 2022-07-01 11:04:50 +03:00
Fabio Alessandrelli 2882eaab28
Merge pull request #62522 from Calinou/html5-editor-no-maximize-on-start-3.x
Fix window maximize error message appearing when starting the web editor (3.x)
2022-07-01 09:57:33 +02:00
Hugo Locurcio 786ff06ed7
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-01 01:54:15 +02:00
Wilson E. Alvarez cf38b6f187
Properly check for fullscreen toggle made through the Window Manager 2022-06-29 21:55:51 -04:00
ne0fhyk 24e3b3b88d 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.
2022-06-26 16:53:02 -07:00
Rémi Verschelde 98b4a7c2da
Merge pull request #61692 from madmiraal/android-ndk-23-3.x
[3.x] Upgrade Android NDK to r23 LTS
2022-06-26 21:24:14 +02:00