Commit Graph

960 Commits

Author SHA1 Message Date
Hugo Locurcio 7d8b344f01
Increase the maximum number of concurrent DNS queries from 32 to 256
This makes the following error message less likely to be printed
when performing many concurrent HTTP requests:

    Condition ' resolving == IP::RESOLVER_INVALID_ID ' is true. returned: ERR_BUG
2022-03-23 18:18:23 +01:00
Haoyu Qiu 680bcef825 Fix crash when exporting projects with shared libraries 2022-03-23 13:53:32 +08:00
bruvzg 35e8fd4d04
Add binary MO translation file support. 2022-03-18 23:23:32 +02:00
bruvzg f19cd44346
Unify TextServer built-in module and GDExtension code. 2022-03-17 08:15:29 +02:00
Rémi Verschelde 51bbcbdec2
Merge pull request #45263 from KoBeWi/😕 2022-03-15 13:18:27 +01:00
Rémi Verschelde 2724e57288
Merge pull request #58772 from keptsecret/fix_filedialog_user_data_access
Fix unable to change directory in user access mode
2022-03-12 20:53:43 +01:00
Rémi Verschelde 768f9422bc Convert uses of `DirAccess *` to `DirAccessRef` to prevent memleaks
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-03-11 09:13:11 +01:00
reduz 6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
keptsecret 664c461d28 fixed unable to change directory in user access mode 2022-03-09 19:33:56 -05:00
kobewi 39d429e497 Change some math macros to constexpr
Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`.
2022-03-09 16:24:32 +01:00
Rémi Verschelde 6c3170e875
Merge pull request #57930 from piiertho/bugfix/add-none-flag-to-resource-saver 2022-03-07 12:05:35 +01:00
Pierre-Thomas Meisels f9d4f08090 Fix ResourceSaver::save method exposition flag parameter
enh: Add FLAG_NONE to SaverFlags in ResourceSaver to fix api inconsistency
fix: flags parameter of ResourceSaver::save is now uint32_t to allow flag composition in scripts
2022-03-07 10:39:51 +01:00
Hugo Locurcio 8e57e5dc6a
Print every file exported with `PCKPacker.flush()`s verbose parameter
Previously, only one line per 100 files was printed.

This also refactors the print statement to use Godot methods and
make it more informative overall.
2022-02-25 02:42:58 +01:00
Rémi Verschelde 719762d4dc
Merge pull request #58166 from Zylann/fix_binary_resource_with_doubles
Fix loading of binary resources with 64-bit floats
2022-02-19 08:22:42 +01:00
Rémi Verschelde 420ad25348
Merge pull request #58205 from Zylann/fix_variant_encode_with_doubles
Add missing flag when encode_variant writes math types with doubles
2022-02-19 08:22:05 +01:00
Ricardo Subtil 61790a03f5 Fix decompression functions not returning errcodes 2022-02-18 13:50:25 +00:00
Marc Gilleron c69d303ba9 Add missing flag when encode_variant writes math types with doubles 2022-02-16 20:47:36 +00:00
Rémi Verschelde b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
Marc Gilleron 722945be61 Fix loading of binary resources with 64-bit floats 2022-02-16 00:55:13 +00:00
Max 6aede992a9 Fixed variant decoding Segmentation Fault 2022-02-14 23:04:05 +03:00
Fabio Alessandrelli f72bd67068 [ResourceUID] Use CryptoCore::RandomGenerator for IDs. 2022-02-14 10:45:50 +01:00
reduz 97feafd0ea Fix resource reuse in binary loader
* Reuse was not setting the internal index.
* Supersedes #52599, without re-reading all properties.
2022-02-12 10:57:51 +01:00
Rémi Verschelde 1bdb82c64e
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
Rémi Verschelde ec00283f91
ResourceImporter: Restore default append logic for new importers
This was changed in #56943 to allow adding new importers from plugins that
take precedence over built-in ones, but this should be opt-in, not the default
behavior.

Fixes #57730.
2022-02-07 09:47:16 +01:00
Rémi Verschelde bd32dd4a48
Merge pull request #56943 from V-Sekai/override-import
Make add_importer and add_post_importer_plugin override existing importers.
2022-02-05 19:50:37 +01:00
Rémi Verschelde df1724470d
Merge pull request #49775 from fire/faster-cvtt
Faster CVTT by lowering default quality
2022-02-05 10:28:07 +01:00
Fabio Alessandrelli 3acc39095e [Net] Fix bogus FileAccessNetwork deconstructor.
Now correctly erases old instances.
The code will likely need overhaul anyway to be usable.
It doesn't apply to editor runs, there's a bunch of inconsistencies on
how to clients are handled, and I don't really understand why multiple
instances are created for a single client/server.
2022-02-05 03:27:19 +01:00
K. S. Ernest (iFire) Lee 419b342a9a Faster CVTT by reducing quality.
Make BC6 and BC7 CVTT faster while still having better quality than DXT5.
2022-02-04 15:15:26 -08:00
bruvzg 244db37508
Cleanup and move char functions to the `char_utils.h` header. 2022-02-04 11:35:01 +02:00
Rémi Verschelde f8f19b313d
Merge pull request #57562 from AnilBK/string-add-contains
String: Add contains().
2022-02-03 22:21:24 +01:00
Anilforextra adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
Fabio Alessandrelli ac4fb2996b [Net] Non-blocking request in HTTPClientTCP.
HTTPClientJavaScript already supports non-blocking requests.
2022-02-03 02:45:30 +01:00
Fabio Alessandrelli 6ff753675a
Merge pull request #56771 from mhilbrunner/unacceptable
Verify custom HTTP headers, fix off by one error
2022-02-02 18:28:30 +01:00
Anilforextra fc27636999 Vectors: Use clear() and has().
Use clear() instead of resize(0).

Use has() instead of "find(p_val) != -1".
2022-02-02 00:11:09 +05:45
Fabio Alessandrelli 49297d937c [Net] Simplify IP resolution code, fix caching.
First, we should not insert into cache if the hostname resolution has
failed (as it might be a temporary internet issue), second, the async
resolver should also properly insert into cache.

Took the chance to remove some duplicate code with critical section in
it at the cost of little performance when calling the blocking
resolve_hostname function.
2022-01-29 01:56:36 +01:00
Rémi Verschelde 9686d680b7
Merge pull request #57116 from bruvzg/win_net_share 2022-01-28 11:03:23 +01:00
Rémi Verschelde e6caaf4c80
Merge pull request #57205 from TechnoPorg/variant-template-cast
Allow method binds to take Object subclasses as arguments
2022-01-27 23:46:37 +01:00
Max Hilbrunner 3ef5a97505 Verify custom HTTP headers, fix off by one error 2022-01-27 03:22:37 +01:00
Max Hilbrunner 3a83872d26 HTTP comment cleanup 2022-01-27 03:22:37 +01:00
TechnoPorg 051ef479c9 Allow method binds to take Object subclasses as arguments
This commit adds a condition to VariantCaster that casts Variants of type OBJECT to any type T, if T is derived from Object.
This change enables a fair bit of code cleanup. First, the Variant implicit cast operators for Node and Control can be removed, which allows for some invalid includes to be removed. Second, helper methods in Tree whose sole purpose was to cast arguments to TreeItem * are no longer necessary.
A few small changes also had to be made to other files, due to the changes cascading down all the includes.
2022-01-25 09:03:36 -07:00
bruvzg 9456454109
Fix translation with multiple sources for the same language.
Remove unnecessary locale length checks.
Add "C" -> "en" locale remap.
2022-01-24 18:58:16 +02:00
bruvzg cba8280515 [Windows] Add support for handling network share paths. 2022-01-24 16:22:59 +02:00
Rémi Verschelde ce42ab238a
Merge pull request #56931 from lyuma/etcpak_po2
Enforce mult-of-4 requirements on etcpak input.
2022-01-23 09:31:35 +01:00
Lyuma b1b20f5f91 Pad etcpak input to 4x4 blocks. Fixes #49981 2022-01-22 17:20:17 -08:00
Fabio Alessandrelli 01e5e98312 [Net] Fix get_response_body_length for large files.
Parsing was fixed, but not the return value for the exposed getter.
2022-01-23 01:30:35 +01:00
Omar Polo bd448e5535 Rename or refactor macros to avoid leading underscores
These are not used consistently and some can conflict with
system-specific defines.  While here, also delete some unused macros.
2022-01-20 20:29:15 +01:00
bruvzg de48d5101b
Fix locale always selecting translation instead of "en", when no match found. 2022-01-19 16:46:48 +02:00
K. S. Ernest (iFire) Lee a6f34ea2d0 Make add_importer and add_post_importer_plugin override existing importers. 2022-01-19 04:53:28 -08:00
bruvzg 40c56ed410
Improve locale detection.
Use separate language, script and country lists.
Add locale selection dialog and property hint.
2022-01-18 14:30:00 +02:00
Hugo Locurcio 40be15920f
Remove support for PVRTC texture encoding and decoding
On the only platform where PVRTC is supported (iOS),
ETC2 generally supersedes PVRTC in every possible way. The increased
memory usage is not really a problem thanks to modern iOS' devices
processing power being higher than its Android counterparts.
2022-01-14 21:08:22 +01:00