summaryrefslogtreecommitdiffstats
path: root/core/io
Commit message (Collapse)AuthorAgeFilesLines
* DirAccessPack: Fix dir_exists and file_exists for res:// pathsRémi Verschelde2019-08-171-1/+5
| | | | | | | Both methods check against containers using relative paths as index, so the `res://` part needs to be stripped. Fixes #26009.
* Replace last occurrences of 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG'Rémi Verschelde2019-08-171-4/+1
| | | | | | | | | | 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.
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily2019-08-1714-244/+112
| | | | | | | | | 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?)
* Remove redundant author doc commentsIAmActuallyCthulhu2019-08-123-11/+0
|
* Remove old doc comments in image_loader headerIAmActuallyCthulhu2019-08-101-12/+0
|
* Merge pull request #31077 from qarmin/coverity_bugsRémi Verschelde2019-08-072-4/+2
|\ | | | | Change some code proposed by Coverity and Cppcheck
| * Add some code changes/fixes proposed by Coverity and Clang Tidyqarmin2019-08-072-4/+2
| |
* | Fixed EOF flag not resetting on seek backTGRCDev2019-08-051-1/+2
|/
* Fix some code found by Coverity Scan and PVS Studioqarmin2019-07-232-3/+4
|
* Changed some code showed in LGTM and Coverageqarmin2019-07-203-3/+4
|
* Add TCP connect timeout.Fabio Alessandrelli2019-07-082-0/+13
| | | | | | | | | Default timeout is 30 seconds (i.e. after 30 seconds of calling connect_to_host if the TCP peer is not connected the connection will error out). This value can be configured in project settings: `network/limits/tcp/connect_timeout_seconds`
* Added release function to PoolVector::Access.Ibrahn Sahir2019-07-063-17/+11
| | | | | | For clarity, assign-to-release idiom for PoolVector::Read/Write replaced with a function call. Existing uses replaced (or removed if already handled by scope)
* Merge pull request #24086 from RandomShaper/bundle-pck-to-executableRémi Verschelde2019-07-051-1/+1
|\ | | | | Enhance game export
| * Add embedded PCK option to PC platformsPedro J. Estébanez2019-07-031-1/+1
| | | | | | | | | | | | The basic point is as in 2.1 (appending the PCK into the executable), but this implementation also patches a dedicated section in the ELF/PE executable so that it matches the appended data perfectly. The usage of integer types is simplified in existing code; namely, using plain `int` for small quantities.
* | WebSocket module now uses wslay library.Fabio Alessandrelli2019-07-041-0/+5
| | | | | | | | | | | | | | | | | | | | Both client and server are supported on native builds (as usual). SSL server is still not supported, but will soon be possible with this new library. The API stays the same, we just need to work out potential issues due to this big library switch.
* | Add TCP Server is_listening methodFabio Alessandrelli2019-07-032-0/+8
| |
* | Fix editor crash when StreamPeerSSL is unavilable.Fabio Alessandrelli2019-07-021-1/+3
| | | | | | | | | | | | The fix for EditorNode is a bit hacky, but the handling of the buttons and features there is hacky too (based on enums that might not reflect the actual state).
* | CryptoCore class to access to base crypto utils.Fabio Alessandrelli2019-07-021-23/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Godot core needs MD5/SHA256/AES/Base64 which used to be provided by separate libraries. Since we bundle mbedtls in most cases, and we can easily only include the needed sources if we so desire, let's use it. To simplify library changes in the future, and better isolate header dependencies all functions have been wrapped around inside a class in `core/math/crypto_base.h`. If the mbedtls module is disabled, we only bundle the needed source files independently of the `builtin_mbedtls` option. If the module is enabled, the `builtin_mbedtls` option works as usual. Also remove some unused headers from StreamPeerMbedTLS which were causing build issues.
* | Merge pull request #30126 from qarmin/remove_unnecessary_codeRémi Verschelde2019-07-017-46/+43
|\ \ | | | | | | Remove unnecessary code and add some error explanations
| * | Remove unnecessary code and add some error explanationsqarmin2019-07-017-46/+43
| | |
* | | Merge pull request #29380 from bojidar-bg/16086-docs-default-valueRémi Verschelde2019-06-291-0/+1
|\ \ \ | |_|/ |/| | Add default values to the editor help, docs, and generated RST
| * | Add default values to the editor help, docs, and generated RSTBojidar Marinov2019-06-271-0/+1
| |/ | | | | | | | | Also, make spacing of "=" in the editor help a bit more consistent. Closes #16086
* / Add encrypted files support to ConfigFileVasiliy Makarov2019-06-272-2/+101
|/ | | | | | | | | Fix #26477 Add in ConfigFile this methods: load_encrypted(path, key) load_encrypted_pass(path, password) save_encrypted(path, key) save_encrypted_pass(path, password)
* Merge pull request #29941 from qarmin/redundant_code_and_othersRémi Verschelde2019-06-278-22/+6
|\ | | | | Remove redundant code, possible NULL pointers and others
| * Some code changed with Clang-Tidyqarmin2019-06-268-22/+6
| |
* | doc: Document EncodedObjectAsID, expose its propertyRémi Verschelde2019-06-261-4/+6
| |
* | Merge pull request #29935 from Faless/net/get_if_multicast_prRémi Verschelde2019-06-216-1/+76
|\ \ | |/ |/| Multicast, more network interfaces info
| * Multicast support in NetSocket/PacketPeerUDPFabio Alessandrelli2019-06-213-0/+27
| |
| * Implement IP.get_local_interfaces.Fabio Alessandrelli2019-06-213-1/+49
| | | | | | | | | | | | | | Allow getting interfaces names and assigned names. On UWP this is not supported, and the function will return one interface for each local address (with interface name the local address itself).
* | Merge pull request #29283 from qarmin/fix_some_always_same_valuesRémi Verschelde2019-06-204-17/+6
|\ \ | |/ |/| Remove always true/false values
| * Fix always true/false valuesqarmin2019-06-204-17/+6
| |
* | Made use of semicolons more consitent, fixed formattingJohnJLight2019-06-193-3/+4
| |
* | Unexpose subclasses of ResourceFormatLoader and -SaverRémi Verschelde2019-06-184-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ResourceFormatLoader and ResourceFormatSaver are meant to be overridden to add support for different formats in ResourceLoader and ResourceSaver. Those should be exposed as they can be overridden in plugins. On the other hand, all predefined subclasses of those two base classes are only meant to register support for new file and resource types, but should not and cannot be used directly from script, so they should not be exposed. Also unexposed ResourceImporterOGGVorbis (and thus its base class ResourceImporter) which are editor-only.
* | Merge pull request #29306 from qarmin/small_code_fixesRémi Verschelde2019-06-121-4/+0
|\ \ | | | | | | Small fixes to unrechable code, possibly overflows, using NULL pointers
| * | Small fixes to unrechable code, possibly overflows, using NULL pointersqarmin2019-06-031-4/+0
| | |
* | | Fix error macro calls not ending with semicolonRémi Verschelde2019-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | It's not necessary, but the vast majority of calls of error macros do have an ending semicolon, so it's best to be consistent. Most WARN_DEPRECATED calls did *not* have a semicolon, but there's no reason for them to be treated differently.
* | | Fix a random SSL crash I saw once.Hein-Pieter van Braam-Stewart2019-06-061-0/+6
| | | | | | | | | | | | | | | I don't know why this happened, I was debugging another issue. This should take care of it though.
* | | Fix errors when attempting to set UNIX permissions when unavailableHugo Locurcio2019-06-032-5/+5
| | | | | | | | | | | | | | | | | | This makes exporting from Windows to Linux work again. This closes #29416.
* | | Merge pull request #25148 from capnm/capnm-print-corrupt-image-pathRémi Verschelde2019-05-301-0/+3
|\ \ \ | | | | | | | | Print the path of a corrupt image
| * | | Print the path of a corrupt imageMartin Capitanio2019-01-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After scanning a path in the project manager or starting a project it is not clear which image can not be loaded. After errors ``` ERROR: _png_error_function: Not a PNG file At: drivers/png/image_loader_png.cpp:62. libpng error: Not a PNG file ERROR: _load_image: PNG Corrupted At: drivers/png/image_loader_png.cpp:94. ``` add ``` ERROR: load_image: Error loading image: path/bad.png At: core/io/image_loader.cpp:69. ```
* | | | Properly unlock mutexqarmin2019-05-301-1/+4
| |/ / |/| |
* | | FileAccessEncrypted: Be more explicit on decryption failureRémi Verschelde2019-05-291-0/+1
| |/ |/| | | | | | | Fixes #24505. Supersedes #25278.
* | Merge pull request #29011 from zann1x/masterRémi Verschelde2019-05-211-1/+5
|\ \ | | | | | | Initialize padding on PoolByteArray serialization
| * | Initialize padding on PoolByteArray serializationLukas Zanner2019-05-191-1/+5
| | |
* | | Style: Fix issues with clang-format 8.0Rémi Verschelde2019-05-202-3/+2
| | |
* | | Fix typos with codespellRémi Verschelde2019-05-192-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 1.15.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear doubleclick leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* | Better handle some self-RSET/RPC in MultiplayerAPIFabio Alessandrelli2019-05-121-6/+10
| | | | | | | | | | Allow calling yourself via RPC/RSET if the mode allows it. Better error messages when you are not allowed to call yourself.
* | Avoid _can_call_mode resetting error message in MultiplayerAPIFabio Alessandrelli2019-05-081-4/+6
| |
* | Add FileAccess::set_unix_permissions for Unix platformsJuan Linietsky2019-04-0710-0/+53
| |
* | Merge pull request #24951 from Mr-Slurpy/local-rpc-sender-id-fixFabio Alessandrelli2019-04-201-0/+13
|\ \ | | | | | | Sender network id is now set to local network id for local rpc calls.