summaryrefslogtreecommitdiffstats
path: root/core/os
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #73793 from myaaaaaaaaa/init-raceRémi Verschelde2023-03-062-4/+4
|\ | | | | | | Fix some race conditions that happen during initialization
| * Fix data races in startup/teardownmyaaaaaaaaa2023-03-062-4/+4
| |
* | Implement ConditionVariablePedro J. Estébanez2023-02-202-7/+122
|/
* Refactor high quality texture importJuan Linietsky2023-01-302-0/+18
| | | | | | | | | | | | | | | * Only two texture import modes for low/high quality now: * S3TC/BPTC * ETC2/ASTC * Makes sense given this is the general preferred and most compatible combination in most platforms. * Removed lossy_quality from VRAM texture compression options. It was unused everywhere. * Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA). * Changed MacOS export settings so required texture formats depend on the architecture selected. This solves the following problems: * Makes it simpler to import textures as high quality, without having to worry about the specific format used. * As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
* Fix code style and consistency of RWLock and SemaphorePedro J. Estébanez2023-01-272-28/+31
|
* Merge pull request #72168 from RandomShaper/sensible_lock_returnRémi Verschelde2023-01-272-11/+8
|\ | | | | | | Booleanize various sync primitives' wait & locking methods
| * Booleanize various sync primitives' wait & locking methodsPedro J. Estébanez2023-01-272-11/+8
| |
* | Remove unused SUPER_L/R constants.bruvzg2023-01-251-2/+0
| |
* | Cleanup and unify keyboard input.bruvzg2023-01-232-164/+42
| | | | | | | | | | | | | | | | | | | | - Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes. - Unify IME behaviour, add inline composition string display on Windows and X11. - Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events. - Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS. - Add support for media key handling on macOS. Co-authored-by: Raul Santos <raulsntos@gmail.com>
* | Merge pull request #71396 from reduz/fix-broken-userdirRémi Verschelde2023-01-212-4/+14
|\ \ | |/ |/| | | Fix cases of broken user:// paths.
| * Fix cases of broken user:// paths.Juan Linietsky2023-01-152-4/+14
| | | | | | | | | | | | | | * Properly validate paths when supplying the project name. * Ensures that the user data dir will always be valid. Fixes 69366.
* | OS: Add `unset_environment`, better validate inputRémi Verschelde2023-01-161-1/+2
| | | | | | | | | | | | | | | | | | Instead of returning an undocumented boolean error code, we do the validation checks that should ensure a successful result. Based on: - https://linux.die.net/man/3/setenv - https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable
* | add CMD_OR_CTRL as a Key and not just a key modifierajreckof2023-01-152-0/+8
|/
* Merge pull request #70714 from Calinou/doc-os-stdinRémi Verschelde2023-01-121-1/+1
|\ | | | | Improve documentation for `OS.read_string_from_stdin()`
| * Improve documentation for `OS.read_string_from_stdin()`Hugo Locurcio2023-01-111-1/+1
| | | | | | | | | | | | This makes it clearer that calls to this method are blocking. The unused method parameter was also removed.
* | One Copyright Update to rule them allRémi Verschelde2023-01-0524-696/+696
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* | Remove duplicate Month and Weekday enumsAaron Franke2022-12-264-56/+67
|/ | | | Well, they were duplicately-exposed, but triplicately-defined.
* Silence `Input.vibrate_handheld()` warning as it's already documentedHugo Locurcio2022-12-162-5/+1
| | | | | | | | | | The warning causes messages to be spammed if you are calling this method in a game that runs on both desktop and mobile platforms, unless you guard all calls to `Input.vibrate_handheld()` with `OS.has_feature("mobile") or OS.has_feature("web")`. Since the limitation is already documented (and is obvious enough given the method's name), the warning message is redundant.
* Add feature tags to signify engine float precisionMikael Hermansson2022-12-071-0/+10
|
* Merge pull request #67906 from groud/simpler_gdextension_configRémi Verschelde2022-12-061-6/+12
|\ | | | | | | Remove unnecessary checks when exporting gdextension binaries and allow using a prefix to auto-detect files
| * Allow specifying a prefix to automatically detect library files for ↵Gilles Roudière2022-12-011-6/+12
| | | | | | | | gdextension exports
* | Use system fonts as fallback and improve system font handling.bruvzg2022-12-041-1/+2
|/ | | | | | | Add support for font weight and stretch selection when using system fonts. Add function to get system fallback font from a font name, style, text, and language code. Implement system font support for Android. Use system fonts as a last resort fallback.
* Simplify GDVIRTUAL_CALL callskobewi2022-10-191-12/+6
|
* Merge pull request #66003 from voidshine/fix_midi_event_mutationRémi Verschelde2022-10-121-5/+0
|\ | | | | | | Fix MIDI note-on events being converted to note-off events
| * Fix MIDI note-on events being converted to note-off eventsvoidshine2022-10-111-5/+0
| | | | | | | | Update documentation with note about MIDI velocity interpretation
* | Merge pull request #66102 from MJacred/feature/getvideoadapterdriverinfoRémi Verschelde2022-10-111-0/+2
|\ \ | | | | | | | | | Fetch video adapter driver name and version from OS
| * | Fetch video adapter driver name and version from OS on Linux/*BSD and WindowsMJacred2022-10-111-0/+2
| |/
* | Merge pull request #64815 from RandomShaper/default_cpu_countRémi Verschelde2022-10-061-1/+2
|\ \ | | | | | | | | | Improve default `OS`'s CPU count getter
| * | Keep a single, portable implementation of `OS::get_processor_count()`Pedro J. Estébanez2022-10-051-1/+2
| | |
* | | Merge pull request #64819 from RandomShaper/enhance_thread_funcsRémi Verschelde2022-10-052-32/+27
|\ \ \ | | | | | | | | | | | | Enhance portability of threading
| * | | Enhance portability of threadingPedro J. Estébanez2022-10-042-32/+27
| | | |
* | | | Rename `Engine.target_fps` and associated project setting to `max_fps`Hugo Locurcio2022-10-031-3/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | This makes the setting easier to find, as research has found there are numerous use cases to limiting FPS. This also improves documentation related to the Engine property and project setting. The project setting also works in projects exported in release mode, so its location in the `debug/` section was misleading.
* / / Remove NO_THREADS fallback code, Godot 4 requires thread supportRémi Verschelde2022-10-039-113/+2
|/ / | | | | | | | | This also removes `OS::can_use_threads` from the public API since it's always true.
* | SCons: Cleanup `DEBUG`, `_DEBUG` and `NDEBUG` definesRémi Verschelde2022-09-233-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `_DEBUG` is MSVC specific so it didn't make much sense to define for Android and iOS builds. - iOS was the only platform to define `DEBUG`. We don't use it anywhere outside thirdparty code, which we usually don't intend to debug, so it seems better to be consistent with other platforms. - Consistently define `NDEBUG` to disable assert behavior in both `release` and `release_debug` targets. This used to be set for `release` for all platforms, and `release_debug` for Android and iOS only. - Due to the above, I removed the only use we made of `assert()` in Godot code, which was only implemented for Unix anyway, should have been `DEV_ENABLED`, and is in PoolAllocator which we don't actually use. - The denoise and recast modules keep defining `NDEBUG` even for the `debug` target as we don't want OIDN and Embree asserting all over the place.
* | Merge pull request #65541 from clayjohn/renderer-settingRémi Verschelde2022-09-201-0/+5
|\ \ | |/ |/| | | Split rendering driver project setting into renderer_name and rendering_driver
| * Split rendering driver project setting into renderer_name and ↵clayjohn2022-09-191-0/+5
| | | | | | | | rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer).
* | Add get_distribution_name() and get_version() to OSMJacred2022-09-161-0/+2
|/ | | | | | supports: LinuxBSD, Windows, macOS, iOS, Android, UWP Co-authored-by: bruvzg
* Fixes #65377: get_datetime_* functions can return wrong valuesJames2022-09-102-36/+29
|
* Fix key mapping changes when moving from macOS to other platformbruvzg2022-09-072-12/+21
| | | | | Removes separate `Command` key (use `Meta` instead). Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
* Merge pull request #65031 from akien-mga/os-drop-obsolete-resource-debuggingRémi Verschelde2022-08-292-44/+0
|\
| * Drop obsolete resource usage debug methods from OS classRémi Verschelde2022-08-292-44/+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-252-5/+0
|\ | | | | Remove unimplemented `OS.dump_memory_to_file()` method
| * Remove unimplemented `OS.dump_memory_to_file()` methodHugo Locurcio2022-08-182-5/+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.
* | Merge pull request #59779 from rainerdeyke/constexpr-operatorsJFonS2022-08-231-20/+24
|\ \ | | | | | | Made Key operators constexpr
| * | Fixed indentsRainer Deyke2022-04-041-4/+4
| | |
| * | Fixed unsafe castsRainer Deyke2022-04-041-4/+8
| | |
| * | Made Key operators constexprRainer Deyke2022-04-041-16/+16
| | | | | | | | | | | | | | | Made operators on Key and KeyModifierMask constexpr, allowing them to be used in switch cases.
* | | Overhaul CLI argument forwarding to processes started by the editorPedro J. Estébanez2022-08-192-7/+0
| |/ |/|
* | [Core] Use std type traits to check operations triviality.Fabio Alessandrelli2022-08-041-4/+5
| |