summaryrefslogtreecommitdiffstats
path: root/core/core_bind.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Rename File's `endian_swap` to `big_endian`Hugo Locurcio2021-05-201-9/+9
| | | | | | | | | | | | | | | | This new name is more consistent with ResourceSaver and StreamPeer.
* | | | Tweak arguments of list_dir_begin()kobewi2021-05-311-4/+4
| |/ / |/| |
* | | Rename File::get_len() get_length()Marcel Admiraal2021-05-251-4/+4
| | |
* | | OS: Better validation of invalid input for get_unix_time_from_datetimeRémi Verschelde2021-05-241-6/+5
|/ / | | | | | | | | | | | | | | | | Default missing keys to Unix time 0 (1970-01-01 at 00:00:00 UTC). Abort if year <= 0, this is not supported by the current algorithm. Prevents an infinite loop further down. Fixes #49022.
* / Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-171-10/+10
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the types of a big number of variables. General rules: - Using `uint64_t` in general. We also considered `int64_t` but eventually settled on keeping it unsigned, which is also closer to what one would expect with `size_t`/`off_t`. - We only keep `int64_t` for `seek_end` (takes a negative offset from the end) and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means we only need to guard against passing negative values in `core_bind.cpp`. - Using `uint32_t` integers for concepts not needing such a huge range, like pages, blocks, etc. In addition: - Improve usage of integer types in some related places; namely, `DirAccess`, core binds. Note: - On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for big files on 32-bit Windows builds made with that toolchain. We might add a workaround. Fixes #44363. Fixes godotengine/godot-proposals#400. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Fix `_File::get_buffer` length always set to p_lengthJohannes2021-04-111-1/+1
|
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-2/+2
|
* [46188] fix: get unix from datetime when empty dictAitor Cereceto2021-03-121-0/+3
|
* Fix negative VRAM valuesEv1lbl0w2021-03-051-1/+1
|
* Remove GDScript bindings for OS.get/set_exit_code, ↵Emmanuel Leblond2021-02-251-16/+0
| | | | SceneTree.quit(<exit_code>) should be used instead
* Improve the `OS.get_environment()`/`OS.set_environment()` documentationHugo Locurcio2021-02-251-3/+3
|
* Expose set_environment to GDScriptBastiaan Olij2021-02-251-0/+5
|
* Merge pull request #46194 from Calinou/os-delay-no-negativeRémi Verschelde2021-02-191-2/+10
|\ | | | | Don't allow negative values for `OS.delay_usec()`/`OS.delay_msec()`
| * Don't allow negative values for `OS.delay_usec()`/`OS.delay_msec()`Hugo Locurcio2021-02-181-2/+10
| | | | | | | | This closes #46190.
* | doc: Sync classref with current sourceRémi Verschelde2021-02-191-1/+1
|/ | | | And fix various bogus bindings following previous PRs.
* Merge pull request #46131 from bruvzg/move_tablet_to_dsRémi Verschelde2021-02-181-23/+0
|\ | | | | Move tablet driver API from OS to DisplayServer
| * Move tablet driver API from OS to DisplayServer.bruvzg2021-02-181-23/+0
| |
* | Modernize atomicsPedro J. Estébanez2021-02-181-5/+5
|/ | | | | | | | | | - Based on C++11's `atomic` - Reworked `SafeRefCount` (based on the rewrite by @hpvb) - Replaced free atomic functions by the new `SafeNumeric<T>` - Replaced wrong cases of `volatile bool` by the new `SafeFlag` - Platform-specific implementations no longer needed Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
* Expose a `File.flush()` method to scriptingHugo Locurcio2021-02-131-0/+6
| | | | | | | | This can be used to ensure a file has its contents saved even if the project crashes or is killed by the user (among other use cases). See discussion in #29075.
* Improve resource load cachereduz2021-02-111-3/+7
| | | | | | -Added a new method in Resource: reset_state , used for reloading the same resource from disk -Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type) -Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
* Merge pull request #45315 from RandomShaper/modernize_threadRémi Verschelde2021-01-311-23/+3
|\ | | | | Modernize Thread
| * Modernize ThreadPedro J. Estébanez2021-01-291-23/+3
| | | | | | | | | | | | | | | | | | - Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
* | Merge pull request #44732 from Calinou/os-add-get-thread-caller-idRémi Verschelde2021-01-261-0/+5
|\ \ | |/ |/| Add an `OS.get_thread_caller_id()` method
| * Add an `OS.get_thread_caller_id()` methodHugo Locurcio2020-12-271-0/+5
| | | | | | | | | | | | | | This can be used to print thread IDs in logs. This can make it easier to debug multi-threaded applications. Co-authored-by: Khaos <khaos@khaos-coders.org>
* | Split OS::execute into two methodsMarcel Admiraal2021-01-091-11/+20
| | | | | | | | | | 1. execute(): Executes a command and returns the results. 2. create_process(): Creates a new process and returns the new process' id.
* | Remove Unnecessary Double ListJoshua Dahl2021-01-041-4/+1
| | | | | | _OS::print_resources_by_type had two of the exact same list, one of which was never used.
* | Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* | Rename MainLoop methods to match Node methodsMarcel Admiraal2020-12-221-3/+3
|/
* Initialize class/struct variables with default values in core/ and drivers/Rafał Mikrut2020-11-231-2/+2
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-0/+2612
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code