summaryrefslogtreecommitdiffstats
path: root/core/os
Commit message (Collapse)AuthorAgeFilesLines
* Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde2021-04-273-53/+1
| | | | | | | | We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
* Add flag to stop printing to stdout/stderrGeorge Marques2021-04-062-0/+35
| | | | | This allows the terminal output to be suppressed but still be captured by print/error handlers.
* Merge pull request #47163 from bruvzg/macos_sandbox_file_dialogRémi Verschelde2021-03-261-0/+2
|\ | | | | FileDialog: add Back/Forward buttons, add message for inaccessible folders.
| * FileDialog: add Back/Forward buttons, add message for inaccessible folders.bruvzg2021-03-231-0/+2
| |
* | Rename some more global enums (Key, Joy, MIDI)Aaron Franke2021-03-231-1/+1
|/
* Allow nullptr with zero length in FileAccess get_bufferAlex Hirsch2021-03-161-1/+1
| | | | fix #47071
* Merge pull request #46810 from W4RH4WK/file-access-get-buffer-parameter-checksRémi Verschelde2021-03-141-0/+2
|\ | | | | Add parameter checks to FileAccess get_buffer functions
| * Add parameter checkes to FileAccess get_buffer functionsAlex Hirsch2021-03-091-0/+2
| | | | | | | | fix #46540
* | Fixes small typos and grammar correctionAnshul7sp12021-03-121-1/+1
| |
* | Move caller_id init to Thread constructor to fix UWP build.bruvzg2021-03-092-1/+6
|/
* Improve thread IDs to avoid collisions with threads not created by the Godot ↵bruvzg2021-03-072-12/+17
| | | | API.
* Fix thread_process_array when NO_THREADS.Fabio Alessandrelli2021-02-261-1/+1
|
* Merge pull request #45061 from razonixx/Add_warning_when_dir_is_inaccesibleRémi Verschelde2021-02-251-1/+1
|\ | | | | Add descriptive error message when trying to access a dir fails
| * Add descriptive error message when trying to access a dir failsCarlos Cabello2021-02-251-1/+1
| |
* | Remove GDScript bindings for OS.get/set_exit_code, ↵Emmanuel Leblond2021-02-252-7/+0
| | | | | | | | SceneTree.quit(<exit_code>) should be used instead
* | Fix Godot returned status code on unexpected errorEmmanuel Leblond2021-02-252-1/+9
|/
* Prevent thread wait on itself for finishPedro J. Estébanez2021-02-251-0/+1
|
* Merge pull request #46131 from bruvzg/move_tablet_to_dsRémi Verschelde2021-02-181-5/+0
|\ | | | | Move tablet driver API from OS to DisplayServer
| * Move tablet driver API from OS to DisplayServer.bruvzg2021-02-181-5/+0
| |
* | Modernize atomicsPedro J. Estébanez2021-02-185-23/+26
|/ | | | | | | | | | - 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>
* Modernize ThreadPedro J. Estébanez2021-01-295-128/+127
| | | | | | | | | - 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)
* Modernize RWLockPedro J. Estébanez2021-01-194-94/+56
| | | | | | | | - Based on C++14's `shared_time_mutex` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed - Simpler for `NO_THREADS`
* Split OS::execute into two methodsMarcel Admiraal2021-01-091-1/+2
| | | | | 1. execute(): Executes a command and returns the results. 2. create_process(): Creates a new process and returns the new process' id.
* Update copyright statements to 2021Rémi Verschelde2021-01-0129-58/+58
| | | | | | | | | | | | | | 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-222-18/+18
|
* wrong double quote output with .csv fixedAlf Kraus2020-12-111-1/+1
|
* Static analyzer fixes:bruvzg2020-12-092-6/+0
| | | | | | Removes unused code in OS. Fixes return types. Fixes few typos.
* [Complex Text Layouts] Implement TextServer interface. Implement Fallback ↵bruvzg2020-11-262-0/+2
| | | | TextServer.
* Initialize class/struct variables with default values in core/ and drivers/Rafał Mikrut2020-11-232-3/+2
|
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-166-8/+0
|
* Merge pull request #40748 from RandomShaper/improve_packed_fs_apiRémi Verschelde2020-11-101-3/+7
|\ | | | | Improve/fix packed data API
| * Improve/fix packed data APIPedro J. Estébanez2020-07-271-3/+7
| | | | | | | | | | | | | | - Enhance directory API - Fix `FileAccess::exists()` not checking for PackedData being disabled - Fix moving to the parent directory (`..`) - Allow absolute paths in existence checks
* | Reorganized core/ directory, it was too fatty alreadyreduz2020-11-0721-25/+822
| | | | | | | | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* | MainLoop: Remove deprecated methodsHaSa10022020-11-011-5/+0
| |
* | OS: Remove unused get_splash_tick_msecRémi Verschelde2020-09-242-6/+0
| | | | | | | | | | | | It was added in 3e20391bf607dc7c452b056854aed4a8c99ba0f6 but it doesn't seem particularly useful, and it was only implemented for the custom splash branch and not the default one, so it could return an uninitialized int.
* | [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-4/+4
| |
* | Register GDScript test tools as test commands to run via command-lineAndrii Doroshenko (Xrayez)2020-09-021-1/+3
|/
* Keep debug & verbose options after loading project from project managerPouleyKetchoupp2020-07-092-0/+6
|
* Move frame delaying functions from Main to OS.Fabio Alessandrelli2020-06-302-0/+39
| | | | | Will allow specific platforms to override it and avoid blocking on the main/GUI thread.
* Add a separate application focus/in notification out from Window focus ↵Juan Linietsky2020-06-302-4/+8
| | | | notification.
* Merge pull request #39189 from touilleMan/issue-38925Rémi Verschelde2020-06-152-12/+2
|\ | | | | Unify OS.get_system_time_* and OS.get_unix_time
| * Remove OS.get_system_time_secs/get_system_time_msecs and change ↵Emmanuel Leblond2020-05-312-12/+2
| | | | | | | | OS.get_unix_time return type to double
* | Print errors when calling MIDI input methods on unsupported platformsHugo Locurcio2020-05-311-1/+5
|/ | | | This partially addresses #32065.
* [Windows] Add tablet driver selection.bruvzg2020-05-201-2/+5
|
* Style: Remove unnecessary semicolons from `core`Rémi Verschelde2020-05-195-28/+29
| | | | | | | | | | Semicolons are not necessary after function definitions or control flow blocks, and having some code use them makes things inconsistent (and occasionally can mess up `clang-format`'s formatting). Removing them is tedious work though, I had to do this manually (regex + manual review) as I couldn't find a tool for that. All other code folders would need to get the same treatment.
* Style: Fix unnecessary semicolons that confused clang-formatRémi Verschelde2020-05-191-3/+2
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-1411-67/+124
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-144-0/+11
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-1420-229/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde2020-05-141-2/+2
| | | | | Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html