summaryrefslogtreecommitdiff
path: root/core/os
AgeCommit message (Collapse)Author
2023-05-12Enable shadow warnings and fix raised errorsNinni Pipping
(cherry picked from commit 71ee65dc5701a0675ae6b1879a694a28c7206a63)
2023-03-27Fix data races in startup/teardownmyaaaaaaaaa
(cherry picked from commit d337ed1c64de89ed410cfe208ea162e4cd4ae503)
2023-02-20Implement ConditionVariablePedro J. Estébanez
2023-01-30Refactor high quality texture importJuan Linietsky
* 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.
2023-01-27Fix code style and consistency of RWLock and SemaphorePedro J. Estébanez
2023-01-27Merge pull request #72168 from RandomShaper/sensible_lock_returnRémi Verschelde
Booleanize various sync primitives' wait & locking methods
2023-01-27Booleanize various sync primitives' wait & locking methodsPedro J. Estébanez
2023-01-25Remove unused SUPER_L/R constants.bruvzg
2023-01-23Cleanup and unify keyboard input.bruvzg
- 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>
2023-01-21Merge pull request #71396 from reduz/fix-broken-userdirRémi Verschelde
Fix cases of broken user:// paths.
2023-01-16OS: Add `unset_environment`, better validate inputRémi Verschelde
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
2023-01-15Fix cases of broken user:// paths.Juan Linietsky
* Properly validate paths when supplying the project name. * Ensures that the user data dir will always be valid. Fixes 69366.
2023-01-15add CMD_OR_CTRL as a Key and not just a key modifierajreckof
2023-01-12Merge pull request #70714 from Calinou/doc-os-stdinRémi Verschelde
Improve documentation for `OS.read_string_from_stdin()`
2023-01-11Improve documentation for `OS.read_string_from_stdin()`Hugo Locurcio
This makes it clearer that calls to this method are blocking. The unused method parameter was also removed.
2023-01-05One Copyright Update to rule them allRémi Verschelde
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".
2022-12-26Remove duplicate Month and Weekday enumsAaron Franke
Well, they were duplicately-exposed, but triplicately-defined.
2022-12-16Silence `Input.vibrate_handheld()` warning as it's already documentedHugo Locurcio
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.
2022-12-07Add feature tags to signify engine float precisionMikael Hermansson
2022-12-06Merge pull request #67906 from groud/simpler_gdextension_configRémi Verschelde
Remove unnecessary checks when exporting gdextension binaries and allow using a prefix to auto-detect files
2022-12-04Use system fonts as fallback and improve system font handling.bruvzg
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.
2022-12-01Allow specifying a prefix to automatically detect library files for ↵Gilles Roudière
gdextension exports
2022-10-19Simplify GDVIRTUAL_CALL callskobewi
2022-10-12Merge pull request #66003 from voidshine/fix_midi_event_mutationRémi Verschelde
Fix MIDI note-on events being converted to note-off events
2022-10-11Fix MIDI note-on events being converted to note-off eventsvoidshine
Update documentation with note about MIDI velocity interpretation
2022-10-11Merge pull request #66102 from MJacred/feature/getvideoadapterdriverinfoRémi Verschelde
Fetch video adapter driver name and version from OS
2022-10-11Fetch video adapter driver name and version from OS on Linux/*BSD and WindowsMJacred
2022-10-06Merge pull request #64815 from RandomShaper/default_cpu_countRémi Verschelde
Improve default `OS`'s CPU count getter
2022-10-05Keep a single, portable implementation of `OS::get_processor_count()`Pedro J. Estébanez
2022-10-05Merge pull request #64819 from RandomShaper/enhance_thread_funcsRémi Verschelde
Enhance portability of threading
2022-10-04Enhance portability of threadingPedro J. Estébanez
2022-10-03Rename `Engine.target_fps` and associated project setting to `max_fps`Hugo Locurcio
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.
2022-10-03Remove NO_THREADS fallback code, Godot 4 requires thread supportRémi Verschelde
This also removes `OS::can_use_threads` from the public API since it's always true.
2022-09-23SCons: Cleanup `DEBUG`, `_DEBUG` and `NDEBUG` definesRémi Verschelde
- `_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.
2022-09-20Merge pull request #65541 from clayjohn/renderer-settingRémi Verschelde
Split rendering driver project setting into renderer_name and rendering_driver
2022-09-19Split rendering driver project setting into renderer_name and ↵clayjohn
rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer).
2022-09-16Add get_distribution_name() and get_version() to OSMJacred
supports: LinuxBSD, Windows, macOS, iOS, Android, UWP Co-authored-by: bruvzg
2022-09-10Fixes #65377: get_datetime_* functions can return wrong valuesJames
2022-09-07Fix key mapping changes when moving from macOS to other platformbruvzg
Removes separate `Command` key (use `Meta` instead). Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
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