summaryrefslogtreecommitdiff
path: root/core/os
AgeCommit message (Collapse)Author
2022-08-29Merge pull request #65031 from akien-mga/os-drop-obsolete-resource-debuggingRémi Verschelde
2022-08-29Drop obsolete resource usage debug methods from OS classRémi Verschelde
These methods exist since the dawn of (open source) Godot and have hardly been updated over time, so they barely work and I'm fairly sure nobody is using them. (See #46505 for details.) While some of the functionality they aimed to provide might be useful for optimization work and introspection, this should likely be redesigned from scratch with a cleaner and more modern interface (e.g. exposed via the Performance singleton, or ResourceLoader, and a better API overall).
2022-08-29[Web] Rename JavaScript platform to Web.Fabio Alessandrelli
Also rename export name from "HTML5" to "Web".
2022-08-25Merge pull request #58530 from Calinou/os-remove-dump-memory-to-fileRémi Verschelde
Remove unimplemented `OS.dump_memory_to_file()` method
2022-08-23Merge pull request #59779 from rainerdeyke/constexpr-operatorsJFonS
Made Key operators constexpr
2022-08-19Overhaul CLI argument forwarding to processes started by the editorPedro J. Estébanez
2022-08-18Remove unimplemented `OS.dump_memory_to_file()` methodHugo Locurcio
This method never did anything in Godot since 3.0, since its code was commented out. The last time the method had an implementation was in Godot 2.1.x.
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-04-04Fixed indentsRainer Deyke
2022-04-04Fixed unsafe castsRainer Deyke
2022-04-04Made Key operators constexprRainer Deyke
Made operators on Key and KeyModifierMask constexpr, allowing them to be used in switch cases.
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