summaryrefslogtreecommitdiff
path: root/core/os
AgeCommit message (Collapse)Author
2021-04-27Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde
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.
2021-04-06Add flag to stop printing to stdout/stderrGeorge Marques
This allows the terminal output to be suppressed but still be captured by print/error handlers.
2021-03-26Merge pull request #47163 from bruvzg/macos_sandbox_file_dialogRémi Verschelde
FileDialog: add Back/Forward buttons, add message for inaccessible folders.
2021-03-23Rename some more global enums (Key, Joy, MIDI)Aaron Franke
2021-03-23FileDialog: add Back/Forward buttons, add message for inaccessible folders.bruvzg
2021-03-16Allow nullptr with zero length in FileAccess get_bufferAlex Hirsch
fix #47071
2021-03-14Merge pull request #46810 from W4RH4WK/file-access-get-buffer-parameter-checksRémi Verschelde
Add parameter checks to FileAccess get_buffer functions
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-03-09Add parameter checkes to FileAccess get_buffer functionsAlex Hirsch
fix #46540
2021-03-09Move caller_id init to Thread constructor to fix UWP build.bruvzg
2021-03-07Improve thread IDs to avoid collisions with threads not created by the Godot ↵bruvzg
API.
2021-02-26Fix thread_process_array when NO_THREADS.Fabio Alessandrelli
2021-02-25Merge pull request #45061 from razonixx/Add_warning_when_dir_is_inaccesibleRémi Verschelde
Add descriptive error message when trying to access a dir fails
2021-02-25Add descriptive error message when trying to access a dir failsCarlos Cabello
2021-02-25Remove GDScript bindings for OS.get/set_exit_code, ↵Emmanuel Leblond
SceneTree.quit(<exit_code>) should be used instead
2021-02-25Fix Godot returned status code on unexpected errorEmmanuel Leblond
2021-02-25Prevent thread wait on itself for finishPedro J. Estébanez
2021-02-18Merge pull request #46131 from bruvzg/move_tablet_to_dsRémi Verschelde
Move tablet driver API from OS to DisplayServer
2021-02-18Modernize atomicsPedro J. Estébanez
- 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>
2021-02-18Move tablet driver API from OS to DisplayServer.bruvzg
2021-01-29Modernize ThreadPedro J. Estébanez
- 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)
2021-01-19Modernize RWLockPedro J. Estébanez
- 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`
2021-01-09Split OS::execute into two methodsMarcel Admiraal
1. execute(): Executes a command and returns the results. 2. create_process(): Creates a new process and returns the new process' id.
2021-01-01Update copyright statements to 2021Rémi Verschelde
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 🎆
2020-12-22Rename MainLoop methods to match Node methodsMarcel Admiraal
2020-12-11wrong double quote output with .csv fixedAlf Kraus
2020-12-09Static analyzer fixes:bruvzg
Removes unused code in OS. Fixes return types. Fixes few typos.
2020-11-26[Complex Text Layouts] Implement TextServer interface. Implement Fallback ↵bruvzg
TextServer.
2020-11-23Initialize class/struct variables with default values in core/ and drivers/Rafał Mikrut
2020-11-16Remove empty lines around braces with the formatting scriptAaron Franke
2020-11-10Merge pull request #40748 from RandomShaper/improve_packed_fs_apiRémi Verschelde
Improve/fix packed data API
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-11-01MainLoop: Remove deprecated methodsHaSa1002
2020-09-24OS: Remove unused get_splash_tick_msecRémi Verschelde
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.
2020-09-03[Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg
2020-09-02Register GDScript test tools as test commands to run via command-lineAndrii Doroshenko (Xrayez)
2020-07-27Improve/fix packed data APIPedro J. Estébanez
- Enhance directory API - Fix `FileAccess::exists()` not checking for PackedData being disabled - Fix moving to the parent directory (`..`) - Allow absolute paths in existence checks
2020-07-09Keep debug & verbose options after loading project from project managerPouleyKetchoupp
2020-06-30Move frame delaying functions from Main to OS.Fabio Alessandrelli
Will allow specific platforms to override it and avoid blocking on the main/GUI thread.
2020-06-30Add a separate application focus/in notification out from Window focus ↵Juan Linietsky
notification.
2020-06-15Merge pull request #39189 from touilleMan/issue-38925Rémi Verschelde
Unify OS.get_system_time_* and OS.get_unix_time
2020-05-31Print errors when calling MIDI input methods on unsupported platformsHugo Locurcio
This partially addresses #32065.
2020-05-31Remove OS.get_system_time_secs/get_system_time_msecs and change ↵Emmanuel Leblond
OS.get_unix_time return type to double
2020-05-20[Windows] Add tablet driver selection.bruvzg
2020-05-19Style: Remove unnecessary semicolons from `core`Rémi Verschelde
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.
2020-05-19Style: Fix unnecessary semicolons that confused clang-formatRémi Verschelde
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
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.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-05-14Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde
Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html