summaryrefslogtreecommitdiff
path: root/core/os/os.cpp
AgeCommit message (Collapse)Author
2021-11-01Add support for PowerPC familyDaniel Kolesa
2021-10-22Add support for the RISC-V architectureAaron Franke
Supports RV64GC (RISC-V 64-bit with general-purpose and compressed-instruction extensions)
2021-10-14Implement toast notifications in the editorGilles Roudière
2021-10-04GDScript completion: Handle quote style ad-hoc to remove editor dependencyRémi Verschelde
`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`.
2021-09-30Merge pull request #48685 from bruvzg/bundle_icon_4Rémi Verschelde
2021-09-16Implement `OS::get_locale_language()` helper methodRémi Verschelde
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.
2021-09-15--single-window is passed through project manager.Jacob Edie
This means you can start godot with --single-window
2021-08-31Make platform feature tag names lowercaseHugo Locurcio
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`
2021-08-16Add partial support for Android scoped storage.ne0fhyk
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.
2021-08-06OS: Fix used resource debug printsRémi Verschelde
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.
2021-08-03[Headless] Add --headless switch (no rendering, no audio).Fabio Alessandrelli
Also remove now unused "--no-window" option, and relative OS getter and setter.
2021-07-22Move `alert` function from `DisplayServer` to `OS`.bruvzg
2021-06-12Merge pull request #49123 from aaronfranke/it-is-timeRémi Verschelde
Add a Time singleton
2021-06-11Add Time singletonAaron Franke
2021-06-11Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde
File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
2021-06-10Add OS.get_external_data_dir() to get Android external directoryMarcel Admiraal
2021-05-13[macOS] Prefer .app bundle icon over the default one.bruvzg
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-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-09Static analyzer fixes:bruvzg
Removes unused code in OS. Fixes return types. Fixes few typos.
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-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-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-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-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-14Port member initialization from constructor to declaration (C++11)Rémi Verschelde
Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
2020-04-28Rename InputFilter back to InputRémi Verschelde
It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690.
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-26Refactored input, goes all via windows now.Juan Linietsky
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky
2020-03-26Refactored Input, create DisplayServer and DisplayServerX11Juan Linietsky
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-14Remove incomplete battery status/power APIRémi Verschelde
It was initially implemented in #5871 for Godot 3.0, but never really completed or thoroughly tested for most platforms. It then stayed in limbo and nobody seems really keen to finish it, so it's better to remove it in 4.0, and re-add eventually (possibly with a different API) if there's demand and an implementation confirmed working on all platforms. Closes #8770.
2020-02-11Add runtime GLES2 / Vulkan context selection.bruvzg
2020-02-11Add static Vulkan loader.bruvzg
Initial Vulkan support for Windows. Initial Vulkan support for macOS.
2020-02-05Remove duplicate WARN_PRINT macro.Marcel Admiraal
2020-01-23Android virtual keyboard respecting LineEdit max length.Bruno Lourenço
2020-01-10[macOS] Load PCK from the .app bundle resources, instead of changing working ↵bruvzg
directory.
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-04Added support for vertical syncing via the Windows OS compositor (DWM.)TerminalJack
2019-11-11Remove ERR_EXPLAIN macros and the scaffolding they needed.Marcel Admiraal
2019-09-25Added some obvious errors explanationsqarmin
2019-08-21Support vibration for Android and iOSvolzhs