Commit Graph

116 Commits

Author SHA1 Message Date
Emmanouil Papadeas c662491bd4
Fix `JavaScriptBridge.eval()` never returning PackedByteArray
It wrongly returned 20 on array buffers, which used to be the enumerator
value of Godot 3.x's type PoolByteArray, and now is the value of type Color,
while it should return 29 which is the enumerator value for PackedByteArray.
2023-08-28 11:37:55 +02:00
Hugo Locurcio 469c462b76
Add missing tutorials to documentation classes 2023-08-19 20:29:24 +02:00
Hugo Locurcio 6f1152bdbe
Add a `--audio-output-latency` command-line argument
This allows optimizing the audio output latency on higher-end CPUs,
especially in projects that do not expose a way to override this setting.
2023-08-17 14:45:17 +02:00
Rémi Verschelde 314cdf456b
Merge pull request #79578 from Faless/web/4.x_dlink_visibility
[Web] Use `fvisibility=hidden` for side module when dlink_enabled.
2023-08-17 11:21:47 +02:00
Aaron Franke ada360affe
Add a button in the export dialog to fix missing texture formats 2023-08-17 02:56:42 -05:00
Rémi Verschelde 3907e53ff6
SCons: Disable C++ exception handling
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.

This is wasteful on multiple aspects:

- Binary size: Around 20% binary size reduction with exceptions disabled
  for both MSVC and GCC binaries.
- Compile time:
  * More than 50% build time reduction with MSVC.
  * 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.

Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.
2023-08-16 10:23:34 +02:00
Rémi Verschelde faaf27f284
Fix various typos with codespell
Also includes typo fixes from #79993, #80068, #80276, and #80303.

Co-authored-by: betalars <contact@betalars.de>
Co-authored-by: spaceyjase <429978+spaceyjase@users.noreply.github.com>
Co-authored-by: Swarkin <102416174+Swarkin@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-08-07 13:09:47 +02:00
Fabio Alessandrelli 61e7d47344 [Web] Update npm packages 2023-07-31 21:43:59 +02:00
Yuri Sizov 63411859db Merge pull request #79351 from Repiteo/dotnet-handle-warnings
C#: Fix MSVC dotnet builds failing if running `dev_mode`
2023-07-26 18:40:06 +02:00
Fabio Alessandrelli f4713d235a [Web] Always return -1 as body length in HTTPClientWeb.
Body length cannot be reliably retrieved from the web.
Reading the "content-length" value will return a meaningless value when
the response is compressed, as reading will return uncompressed chunks
in any case, resulting in a mismatch between the detected body size and
the actual size returned by repeatedly calling read_response_body_chunk.

Additionally, while "content-length" is considered a safe CORS header,
"content-encoding" is not, so using the "content-encoding" to decide if
"content-length" is meaningful is not an option either.

We simply must accept the fact that browsers are awful when it comes to
networking APIs.
2023-07-24 08:57:02 +02:00
Thaddeus Crews 897334a366
Allow MSVC dev_mode builds to succeed with dotnet
• Added #else section to mono #ifdef checks in relevant export_plugin scripts
2023-07-17 11:35:38 -05:00
Fabio Alessandrelli 5eed870a6a [Web] Use fvisibility=hidden for side module when dlink_enabled.
This hugely reduces the number of exports, making it acceptable for
browsers.

Note that dlink + threads is still not working due to upstream issues
with the pthread emulation library.

Should hopefully be solved once emscripten move to native WASM threads.
2023-07-17 13:18:02 +02:00
Hendrik Brucker 7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
Yuri Sizov 1da09fd477 Merge pull request #79062 from MewPurPur/svg-optimizations
Optimize SVG icons and remove unused Transpose icon
2023-07-12 21:02:53 +02:00
Yuri Sizov 2b47f6715e Merge pull request #78437 from bruvzg/set_icon
Add error checks and harmonize behavior of the `set_icon` method.
2023-07-12 15:09:14 +02:00
Yuri Sizov 6960a1d0e8 Merge pull request #78248 from felaugmar/load-svg-adjustable-scale
Added `Image::load_svg_from_(buffer|string)`
2023-07-12 15:09:03 +02:00
Kamil Brzoskowski 3cd865dbe8
Fix formatting of dlopen error message on Windows
And harmonize the format for all platforms.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-07-09 23:39:45 +02:00
Rémi Verschelde ce32fe974e
Merge pull request #79048 from sepTN/its-platform-not-plafrom
Fix a typo in the TLSOptions documentation
2023-07-08 18:21:28 +02:00
Septian b88b6b4f48 fix typo on TLSOptions.xml and library_godot_display.js 2023-07-08 13:34:50 +07:00
MewPurPur fe194f8db0 Optimize SVG icons and remove unused Transpose icon 2023-07-07 17:58:15 +03:00
Rémi Verschelde 81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde 346f1ab86b
Bump version to 4.2-dev
Keep on waitin'
2023-07-05 22:07:03 +02:00
bruvzg 9c5a0c6c10
Add error checks and harmonize behavior of the set_icon method. 2023-07-03 13:48:28 +03:00
Hugo Locurcio 0b19ec3498
Display a message about missing C# support on Android/iOS/Web platforms
When trying to export a C# project, this displays an error message after
creating a export preset for an unsupported platform.

Support for these platforms is planned for a future release.
2023-06-24 00:09:06 +02:00
Felipe Augusto Marques 26eb3db234 Added Image's `load_svg_from_(buffer|string)`
No core dependency to the svg module.
2023-06-23 00:43:43 -03:00
Rémi Verschelde 90446fe9f3
SCons: Move platform logo/run icon to `export` folder
Follow-up to #75932.
Since these icons are only used by the export plugin, it makes sense to
move them and generate the headers there.

The whole `detect.is_active()` logic seems to be a leftover from before
times, as far back as 1.0-stable it already wasn't used for anything.

So I'm removing it and moving the export icon generation to
`platform_methods`, where it makes more sense.
2023-06-20 13:16:37 +02:00
Michael Alexsander 41a75cfa4f
Allow exporting release Android builds without a debug keystore 2023-06-19 01:00:13 -03:00
bruvzg 28db3c7158 [DisplayServer] Add method to check if native window is focused. 2023-06-16 10:27:52 +03:00
Rémi Verschelde 9e4315bb50
Style: Harmonize header includes in platform ports
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module should be included with relative
paths (relative to the root folder of the modular component, e.g.
`platform/linuxbsd/`), in their own section before Godot's "core" includes.

The `api` and `export` subfolders also need to be handled as self-contained
(and thus use relative paths for their "local" includes) as they are all
compiled for each editor platform, without necessarily having the api/export
matching platform folder in the include path.
E.g. the Linux editor build will compile `platform/android/{api,export}/*.cpp`
and those need to use relative includes for it to work.
2023-06-08 15:19:19 +02:00
hlutor a932c5e81d Added override for window_get_vsync_mode in display_server_web.cpp 2023-05-31 18:23:06 -06:00
Zae 14908140ea Fix `HTTPClient.get_response_body_length()` incorrect on Web 2023-05-30 15:22:51 +08:00
bruvzg 5b9984b5a2
Add `audio/general/text_to_speech` project setting to enable/disable TTS. 2023-05-18 20:16:03 +03:00
HolonProduction ddcb2d157d Don't expose mac specific display server. 2023-05-11 11:02:08 +02:00
Samuele Panzeri 4aaa2e6477 Fix wait for thread not started 2023-04-27 20:28:22 +02:00
Rémi Verschelde 8f7b09916d
Merge pull request #76026 from YuriSizov/editor-running-up-that-gui
Extract editor run toolbar into its own component
2023-04-26 12:15:29 +02:00
Rémi Verschelde b58873b98a
Merge pull request #69833 from Eoin-ONeill-Yokai/audio_invalid_mixrate
Fix crash caused by invalid mix_rate assignment due to bogus project settings.
2023-04-26 11:35:37 +02:00
Eoin O'Neill 5a08091168 Fix crash caused by invalid mix_rate assignment due to bogus
project settings.

We'll default to a sensible value in the case that a user has
somehow managed to modify the configuration file incorrectly.

Closes 69819
2023-04-25 23:52:50 -07:00
Hugo Locurcio 303bf247de
Add support for VRAM-compressed custom mouse cursor images
No memory is actually saved when using this, so lossless modes are
still recommended as they look better and load faster.
2023-04-21 18:01:47 +02:00
bruvzg a5128e71bb
[Export docs] Move docs to platform folders. 2023-04-20 11:02:12 +03:00
Yuri Sizov 8a74d8438f Extract editor run toolbar into its own component
- Simplify and update its logic.
- Simplify EditorScript.
- Improve EditorNode and other relevant includes.
- Fix scene-based path in the movie writer when
reloading a scene.
2023-04-19 17:12:28 +02:00
bruvzg 0088981c40
[Export] Add readable descriptions and validation warnings to the export options. 2023-04-19 08:35:59 +03:00
Rémi Verschelde f7f7250c0d
Merge pull request #75827 from Kvel2D/fix-custom-cursor-atlas-texture-bug
Fix custom cursor using atlas texture
2023-04-11 19:40:44 +02:00
Kvel2D 41f0a523db Fix custom cursor using atlas texture
Remove image.is_valid() check
There is already a fail condition and image is not used before that
Move up texture_is_valid() check
2023-04-11 19:16:24 +02:00
bruvzg a5009f4d3c
[Web] Detect host OS and use macOS keys on mac hosts. 2023-04-11 10:58:54 +03:00
bruvzg 744bf604bf [Web] Fix keycode/physical keycode mixed up. 2023-04-06 09:40:59 +03:00
ator-dev dfb405b702 Fix "Download Project Source" for Web Editor
- Correctly pass safe project name and safe datetime to `vformat`
2023-03-21 19:20:52 +00:00
bruvzg 0b0587af97
[Web] Fix some missing keycode mappings. 2023-03-06 11:55:49 +02:00
Rémi Verschelde 4574b97752
Fix crash with bogus shape index to DisplayServer.cursor_set_custom_image()
Fixes #66605.
2023-02-17 14:17:37 +01:00
bruvzg a322f3f578
[InputEventKey] Avoid setting both key and modifier to the same value. 2023-02-14 09:05:58 +02:00
Emmanouil Papadeas c36460060e
Further refactoring to AudioDriver implementations after #69120.
- Rename all instances of `capture_start()` and `capture_end()` to their new
  names. Fixes #72892.
- More internal renames to match what was started in #69120.
- Use `override` consistently so that such refactoring bugs can be caught.
- Harmonize the order of definition of the overridden virtual methods in each
  audio driver.
- Harmonize prototype for `set_output_device` and `set_input_device`.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-02-09 11:02:00 +01:00