summaryrefslogtreecommitdiffstats
path: root/core/os/os.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #65031 from akien-mga/os-drop-obsolete-resource-debuggingRémi Verschelde2022-08-291-40/+0
|\
| * Drop obsolete resource usage debug methods from OS classRémi Verschelde2022-08-291-40/+0
| | | | | | | | | | | | | | | | | | | | | | 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).
* | [Web] Rename JavaScript platform to Web.Fabio Alessandrelli2022-08-291-1/+1
|/ | | | Also rename export name from "HTML5" to "Web".
* Merge pull request #58530 from Calinou/os-remove-dump-memory-to-fileRémi Verschelde2022-08-251-4/+0
|\ | | | | Remove unimplemented `OS.dump_memory_to_file()` method
| * Remove unimplemented `OS.dump_memory_to_file()` methodHugo Locurcio2022-08-181-4/+0
| | | | | | | | | | | | 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.
* | Overhaul CLI argument forwarding to processes started by the editorPedro J. Estébanez2022-08-191-4/+0
|/
* Add support for command-line user arguments.Juan Linietsky2022-08-011-1/+2
| | | | | | | | | | 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`
* HTML5: Add support for `Input.vibrate_handheld()`pattlebass2022-07-271-1/+1
|
* Adding print_rich for printing with BBCodeVoylin2022-06-291-0/+15
|
* Implement Running Godot as Movie Writerreduz2022-06-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | * 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).
* Improve architectures in OS::has_feature and make them work on MSVCAaron Franke2022-06-061-4/+27
|
* Improve embedded PCK loading and exporting.bruvzg2022-04-201-0/+5
| | | | | | | | | | 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.
* Narrow FileAccess scope to prevent deadlocks.bruvzg2022-04-121-2/+2
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-111-15/+18
|
* Convert uses of `DirAccess *` to `DirAccessRef` to prevent memleaksRémi Verschelde2022-03-111-6/+2
| | | | | | | | `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>
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-161-2/+4
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* Add an `OS.get_processor_name()` methodHugo Locurcio2022-02-151-0/+4
| | | | | | | | 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.
* Fix multiple missing UTF-8 decoding.bruvzg2022-01-061-1/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-3/+3
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Add support for PowerPC familyDaniel Kolesa2021-11-011-0/+9
|
* Add support for the RISC-V architectureAaron Franke2021-10-221-0/+9
| | | | Supports RV64GC (RISC-V 64-bit with general-purpose and compressed-instruction extensions)
* Implement toast notifications in the editorGilles Roudière2021-10-141-2/+2
|
* GDScript completion: Handle quote style ad-hoc to remove editor dependencyRémi Verschelde2021-10-041-1/+0
| | | | | | | | `core` and `scene` shouldn't depend on `editor`, so they can't query this style setting in `get_argument_options`. But we can handle it after the fact in GDScript's completion code. Also cleans up a couple extra unused invalid includes in `core`.
* Merge pull request #48685 from bruvzg/bundle_icon_4Rémi Verschelde2021-09-301-0/+5
|\
| * [macOS] Prefer .app bundle icon over the default one.bruvzg2021-05-131-0/+5
| |
* | Implement `OS::get_locale_language()` helper methodRémi Verschelde2021-09-161-0/+6
| | | | | | | | | | | | | | | | | | This method extracts the 2 or 3-letter language code from `OS::get_locale()`, making it easier for users to identify the "main" language code for users that might have different OS locales due to different OS or region, but should be matched to the same translation (e.g. "generic" Spanish). Fixes #40703.
* | --single-window is passed through project manager.Jacob Edie2021-09-151-0/+4
| | | | | | | | This means you can start godot with --single-window
* | Make platform feature tag names lowercaseHugo Locurcio2021-08-311-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature tag names are still case-sensitive, but this makes built-in feature tags more consistent. - `Windows` -> `windows` - `OSX` -> `osx` - `LinuxBSD` -> `linuxbsd` - `Android` -> `android` - `iOS` -> `ios` - `HTML5` -> `html5` - `JavaScript` -> `javascript` - `UWP` -> `uwp`
* | Add partial support for Android scoped storage.ne0fhyk2021-08-161-6/+1
| | | | | | | | | | This is done by providing API access to app specific directories which don't have any limitations and allows us to bump the target sdk version to 30. In addition, we're also bumping the min sdk version to 19 as version 18 is no longer supported by Google Play Services and only account of 0.3% of Android devices.
* | OS: Fix used resource debug printsRémi Verschelde2021-08-061-1/+1
| | | | | | | | | | | | These methods were broken by 22419082d9bedbc9dc060ea5784bb0871f8710a3 5 years ago and nobody complained, so maybe they're not so useful... But at least this should restore them to a working state.
* | [Headless] Add --headless switch (no rendering, no audio).Fabio Alessandrelli2021-08-031-8/+0
| | | | | | | | | | Also remove now unused "--no-window" option, and relative OS getter and setter.
* | Move `alert` function from `DisplayServer` to `OS`.bruvzg2021-07-221-0/+4
| |
* | Merge pull request #49123 from aaronfranke/it-is-timeRémi Verschelde2021-06-121-31/+2
|\ \ | | | | | | Add a Time singleton
| * | Add Time singletonAaron Franke2021-06-111-31/+2
| | |
* | | Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-2/+2
|/ / | | | | | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* / Add OS.get_external_data_dir() to get Android external directoryMarcel Admiraal2021-06-101-0/+5
|/
* Add flag to stop printing to stdout/stderrGeorge Marques2021-04-061-0/+28
| | | | | This allows the terminal output to be suppressed but still be captured by print/error handlers.
* 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 🎆
* Static analyzer fixes:bruvzg2020-12-091-4/+0
| | | | | | Removes unused code in OS. Fixes return types. Fixes few typos.
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* OS: Remove unused get_splash_tick_msecRémi Verschelde2020-09-241-4/+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.
* Keep debug & verbose options after loading project from project managerPouleyKetchoupp2020-07-091-0/+4
|
* Move frame delaying functions from Main to OS.Fabio Alessandrelli2020-06-301-0/+36
| | | | | Will allow specific platforms to override it and avoid blocking on the main/GUI thread.
* Merge pull request #39189 from touilleMan/issue-38925Rémi Verschelde2020-06-151-9/+1
|\ | | | | 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-311-9/+1
| | | | | | | | 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.
* Style: Remove unnecessary semicolons from `core`Rémi Verschelde2020-05-191-8/+9
| | | | | | | | | | 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-141-12/+23
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html