summaryrefslogtreecommitdiff
path: root/core/os
AgeCommit message (Collapse)Author
2022-08-04[Core] Use std type traits to check operations triviality.Fabio Alessandrelli
2022-08-01Add support for command-line user arguments.Juan Linietsky
Implements the standard Unix double dash (--) commandline argument: * Arguments after a double dash (--) are ignored by Godot and stored for the user. * User can access them via `OS.get_cmdline_user_args()` Example: `godot.exe scene_to_run.tscn --fullscreen -- --start-level 2`
2022-07-27HTML5: Add support for `Input.vibrate_handheld()`pattlebass
2022-07-26Implement support for loading system fonts on Linux, macOS / iOS and Windows.bruvzg
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-07-21Rename OSX to macOS and iPhoneOS to iOS.bruvzg
2022-07-07[macOS] Improve file association handling, and allow URL schema handling.bruvzg
2022-06-29Adding print_rich for printing with BBCodeVoylin
2022-06-21Merge pull request #62122 from reduz/implement-movie-writerRémi Verschelde
Implement a Movie Maker mode
2022-06-21Implement Running Godot as Movie Writerreduz
* Allows running the game in "movie writer" mode. * It ensures entirely stable framerate, so your run can be saved stable and with proper sound (which is impossible if your CPU/GPU can't sustain doing this in real-time). * If disabling vsync, it can save movies faster than the game is run, but if you want to control the interaction it can get difficult. * Implements a simple, default MJPEG writer. This new features has two main use cases, which have high demand: * Saving game videos in high quality and ensuring the frame rate is *completely* stable, always. * Using Godot as a tool to make movies and animations (which is ideal if you want interaction, or creating them procedurally. No other software is as good for this). **Note**: This feature **IS NOT** for capturing real-time footage. Use something like OBS, SimpleScreenRecorder or FRAPS to achieve that, as they do a much better job at intercepting the compositor than Godot can probably do using Vulkan or OpenGL natively. If your game runs near real-time when capturing, you can still use this feature but it will play no sound (sound will be saved directly). Usage: $ godot --write-movie movie.avi [scene_file.tscn] Missing: * Options for configuring video writing via GLOBAL_DEF * UI Menu for launching with this mode from the editor. * Add to list of command line options. * Add a feature tag to override configurations when movie writing (fantastic for saving videos with highest quality settings).
2022-06-16Adding function key support from F17 to F35gregcsokas
OSX supports everything by default, Linux is also capable of supporting every function key, Windows as I know support only up to F24
2022-06-06Improve architectures in OS::has_feature and make them work on MSVCAaron Franke
2022-05-12Merge pull request #60643 from clayjohn/GLES3-3DRémi Verschelde
2022-05-12Basic 3D renderingclayjohn
2022-05-12Add a new HashMap implementationreduz
Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
2022-05-05Fix inconsistent naming in TimeNicholas Huelin
2022-05-03Add OS::is_process_running function.mdavisprog
Adds the is_process_running function to the native OS class and exposes it to script. This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function. Documentation is updated to reflect new API function.
2022-05-03Merge pull request #60601 from touilleMan/gdextension_get_library_pathRémi Verschelde
Add GDNativeInterface::get_library_path to GDExtension
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
2022-04-29Add GDNativeInterface::get_library_path to GDExtensionEmmanuel Leblond
2022-04-27Merge pull request #56093 from bruvzg/pck_section_loadRémi Verschelde
Improve embedded PCK loading and exporting.
2022-04-27Merge pull request #59979 from bruvzg/cpp_check2Rémi Verschelde
2022-04-20Improve embedded PCK loading and exporting.bruvzg
Windows export process: Limit size of executable with embedded PCK to 4 GB. Use "rcedit" before embedding PCK. Capture and process "rcedit" errors. Windows, Linux: Add support for PCK loading from executable "pck" section.
2022-04-20Fix more issues found by cppcheck.bruvzg
2022-04-17Proper validation of negative values in datetime strings and datetime dictslaws65
2022-04-15Quick fix: Crash when parsing invalid datetime string #60189Oğuzhan Eroğlu
2022-04-13validate input in Time.get_datetime_string_from_dict()RedHeadphone
format fix better fix to handle ERR_FAIL_COND_V_MSG return data type
2022-04-12Narrow FileAccess scope to prevent deadlocks.bruvzg
2022-04-11Make FileAccess and DirAccess classes reference counted.bruvzg
2022-04-06Fix some issues found by cppcheck.bruvzg
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
2022-03-26Object: Remove unused category boilerplateRémi Verschelde
We might want to re-add something like this if/when we find a good use case for it and do the effort to categorize all objects in the API properly. Until then, it's better to remove that boilerplate since it's not needed. Closes #18711.
2022-03-18Rename the "BackSpace" and "BackTab" key strings to "Backspace"/"Backtab"Hugo Locurcio
2022-03-14Include platform_config.h in thread.cpp and thread.hBartłomiej T. Listwon
2022-03-11Convert uses of `DirAccess *` to `DirAccessRef` to prevent memleaksRémi Verschelde
`DirAccess *` needs to be deleted manually, and this is often forgotten especially when doing early returns with `ERR_FAIL_COND`. `DirAccessRef` is deleted automatically when it goes out of scope. Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-02-23Add offset string from minutes conversion method to Time singletonAaron Franke
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-15Add an `OS.get_processor_name()` methodHugo Locurcio
This method can be used to get the CPU model name. It can be used in conjunction with `RenderingServer.get_video_adapter_name()` and `RenderingServer.get_video_adapter_vendor()` for annotating benchmarks and automatic graphics quality configuration.
2022-02-14[OS/Crypto] Add get_entropy to OS.Fabio Alessandrelli
Implemented via `BCryptGenRandom` on Windows. Implemented via `getentropy` syscall when available. Implemented via `/dev/urandom` device as a fallback. The `/dev/urandom` fallback can be disabled via the `NO_URANDOM` build flag. Note: The HTML5 version relies on emscripten file system urandom device which itself uses the Crypto API when available or the plain old not crypto-safe `Math.random()` otherwise. Restore get_entropy.
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
2022-01-18Replace use of `OS::set_exit_code()` by `SceneTree::quit()` in `EditorNode`Emmanuel Leblond
2022-01-17Merge pull request #56012 from bruvzg/wt🤎4Rémi Verschelde
2022-01-12Merge pull request #56492 from akien-mga/remove-author-docstringsRémi Verschelde
2022-01-06Fix multiple missing UTF-8 decoding.bruvzg
2022-01-04Style: Remove inconsistently used `@author` docstringsRémi Verschelde
Each file in Godot has had multiple contributors who co-authored it over the years, and the information of who was the original person to create that file is not very relevant, especially when used so inconsistently. `git blame` is a much better way to know who initially authored or later modified a given chunk of code, and most IDEs now have good integration to show this information.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-18[Windows] Improve console handling and execute/create_process.bruvzg
Always build with the GUI subsystem. Redirect stdout and stderr output to the parent process console. Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with `create_process`). Add `open_console` argument to the `execute` and `create_process` to open a new console window. Remove `interface/editor/hide_console_window` editor setting. Remove `Toggle System Console` menu option. Remove `set_console_visible` and `is_console_visible` functions.
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-11-19[HTML5] Add WebGL2 (GLES3) support using the OpenGL renderer.Fabio Alessandrelli
Note, the editor build requires the mbedtls module to be manually enabled, as it is currently needed as a ResourceUID dependency. This will need to be addressed in a separate PR.
2021-11-19Merge pull request #54499 from Faless/threads/4.x_work_pool_defaultRémi Verschelde