summaryrefslogtreecommitdiff
path: root/core/io
AgeCommit message (Collapse)Author
2020-02-05Remove duplicate WARN_PRINT macro.Marcel Admiraal
2020-02-05Remove duplicate ERR_PRINT macro.Marcel Admiraal
2020-01-22Fixes leak when importing zip in AssetLibHaoyu Qiu
2020-01-21Merge pull request #35408 from Faless/ws/fix_packet_countRémi Verschelde
Fix MultiplayerAPI crash when peer implementation misbehave.
2020-01-21Fix MultiplayerAPI crash when peer impl misbehave.Fabio Alessandrelli
Also fix WebSocketMultiplayer::get_available_packet_count() return value when peer is not configured to use the multiplayer API.
2020-01-20Merge pull request #35345 from timothyqiu/pck-packer-leakRémi Verschelde
Fixes leak when calling PCKPacker::pck_start multiple times
2020-01-20Fixes leak when pck_start multiple timesHaoyu Qiu
2020-01-20Fixes XMLParser leak when open multiple timesHaoyu Qiu
2020-01-19PacketPeer use heap buffer for var encoding.Fabio Alessandrelli
Used to allocate in stack (via alloca) which causes crashes when trying to encode big variables. The buffer grows as needed up to `encode_buffer_max_size` (which is 8MiB by default) and always in power of 2.
2020-01-09GDScript: Validate object instance on `is` operationGeorge Marques
Avoids crashes on debug mode. Instead it now breaks the execution and show the error in-editor. Will still crash on release. Also add a similar check to Marshalls to ensure the debugger doesn't crash when trying to serialize the invalid instance.
2020-01-08Check if resource exists before loadingTomasz Chabora
2020-01-06PCK: Set VERSION_PATCH in header, factor out header magicJoost Heitbrink
Unify pack file version and magic to avoid hardcoded literals. `version.py` now always includes `patch` even for the first release in a new stable branch (e.g. 3.2). The public name stays without the patch number, but `Engine.get_version_info()` already included `patch == 0`, and we can remove some extra handling of undefined `VERSION_PATCH` this way. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-01-03MultiplayerAPI: Fix disconnect errors when passing invalid peerRémi Verschelde
Fixes #34634.
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-22Fix buffers size calculation in PacketPeerStream.Fabio Alessandrelli
The calculation used to be wrong when exactly at a power of 2. `nearest_shift` always return the "next" power of 2 `nearest_shift(4) == 3 # 2^3 = 8`. On the other hand `next_power_of_2` returns the exact value if that value is a power of 2 (i.e. `next_power_of_2(4) == 4`). I.e. : ``` WARN_PRINT(itos(next_power_of_2(4)) + " " + itos(1 << nearest_shift(4))); // WARNING: ... : 4 8 ``` Is this by design?
2019-12-14UDP sockets broadcast is now disabled by default.Fabio Alessandrelli
Add method `set_broadcast_enabled` to allow enabling broadcast via GDScript.
2019-12-10NetSocket set_broadcast_enabled returns Error enumFabio Alessandrelli
2019-12-07Make some arguments in PCKPacker methods optionalHugo Locurcio
Those arguments aren't required for most common use cases, so making them optional should help with code readability.
2019-12-04ResourceLoader: Add language code matching for localized resourcesRémi Verschelde
Near matching was not implemented like in TranslationServer, so a resource remapped for 'ru' (but not 'ru_RU') would not be used as fallback if the system locale was 'ru_RU'. Fixes #34058.
2019-12-01Merge pull request #33640 from mewin/http_head_requestFabio Alessandrelli
Fix HTTP HEAD requests
2019-11-26do not wait for response body when making a HEAD requestPatrick Wuttke
2019-11-25Merge pull request #33862 from Faless/net/http_request_chunk_sizeRémi Verschelde
Add download_chunk_size property to HTTPRequest.
2019-11-24Add download_chunk_size property to HTTPRequest.Fabio Alessandrelli
This allows setting the `read_chunk_size` of the internal HTTPClient. This is important to reduce the allocation overhead and number of file writes when downloading large files, allowing for better download speed.
2019-11-23Merge pull request #33652 from Black-Cat/http-client-fixFabio Alessandrelli
Fix HTTPClient::poll crash when connection set to null
2019-11-23Fix HTTPClient::poll crash when connection set to nullArtem Burjachenko
2019-11-20Fix some overflows and unitialized variablesRafał Mikrut
2019-10-25MultiplayerAPI cleanup cache when peer disconnectsFabio Alessandrelli
We used to only cleanup path_get_cache and not path_send_cache causing issues when a peer disconnects and then reconnects with the same ID.
2019-10-08Merge pull request #32426 from gianllucah/masterRémi Verschelde
Option to erase a section key in ConfigFile
2019-10-07Added a method to erase section key in ConfigFileGianlluca
2019-10-03Fix small memory leak in PackedSourcePCK::try_open_packqarmin
2019-09-26Merge pull request #32228 from damianday/patch-1Fabio Alessandrelli
TCP is_connected_to_host comparison error
2019-09-25Update stream_peer_tcp.cppDamian Day
2019-09-25Merge pull request #32291 from Dragoncraft89/add_load_resource_flagRémi Verschelde
Add flag to control the replacement of files by ProjectSettings.load_resource_pack
2019-09-25Add flag to control the replacement of files by ↵Florian Kothmeier
ProjectSettings.load_resource_pack
2019-09-25Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde
Added some obvious errors explanations
2019-09-25Added some obvious errors explanationsqarmin
2019-09-23Merge pull request #32055 from qarmin/some_code_fixesRémi Verschelde
Changed some code found by Clang Tidy and Coverity
2019-09-23Merge pull request #32032 from nekomatata/encrypted-file-get-pathRémi Verschelde
Implemented get_path() & get_path_absolute() for FileAccessEncrypted
2019-09-22Changed some code found by Clang Tidy and Coverityqarmin
2019-09-21TCP is_connected_to_host comparison errorDamian Day
We was returning true when the state was not connected, so we would never return true when the state was connected.
2019-09-07Implemented get_path() & get_path_absolute() for FileAccessEncryptedPouleyKetchoupp
2019-09-05Add network profilerjfons
2019-08-30Fix memory leak in ResourceFormatSaverBinary::saveqarmin
2019-08-21Merge pull request #29871 from Faless/crypto/initial_prRémi Verschelde
More Crypto, SSL server, crt/key as Resource, HashingContext
2019-08-21Rewrite StreamPeerSSL with SSLContext helper classFabio Alessandrelli
connect_to_stream now accepts optional parameter to specify which certificates to trust. Implement accept_stream (SSL server) with key/cert parameters to specify the RSA key and X509 certificate resources.
2019-08-21Support for file not found in ConfigFile::Load and handle a few specific casesPouleyKetchoupp
EditorSettings::set_project_metadata: creates project_metadata.cfg if it doesn't exist EditorPlugin::get_config: removed (not used) Fixes #31444
2019-08-19Move CryptoCore to it's own folder.Fabio Alessandrelli
Crypto classes will be placed in core/crypto.
2019-08-17DirAccessPack: Fix dir_exists and file_exists for res:// pathsRémi Verschelde
Both methods check against containers using relative paths as index, so the `res://` part needs to be stripped. Fixes #26009.
2019-08-17Replace last occurrences of 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG'Rémi Verschelde
The last remaining ERR_EXPLAIN call is in FreeType code and makes sense as is (conditionally defines the error message). There are a few ERR_EXPLAINC calls for C-strings where String is not included which can stay as is to avoid adding additional _MSGC macros just for that. Part of #31244.
2019-08-17Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily
Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)