summaryrefslogtreecommitdiffstats
path: root/drivers/unix
Commit message (Collapse)AuthorAgeFilesLines
* [iOS] Fix getting Unicode executable path, fix "!configured" and ↵bruvzg2022-11-161-1/+1
| | | | "!classes.has(ti.inherits)" error spam on start.
* Unify usage of GLOBAL/EDITOR_GETkobewi2022-10-181-3/+3
|
* Merge pull request #66102 from MJacred/feature/getvideoadapterdriverinfoRémi Verschelde2022-10-112-0/+6
|\ | | | | | | Fetch video adapter driver name and version from OS
| * Fetch video adapter driver name and version from OS on Linux/*BSD and WindowsMJacred2022-10-112-0/+6
| |
* | Cleanup unused defines in platform codeRémi Verschelde2022-10-111-2/+2
| |
* | SCons: Cleanup GCC warnings configurationRémi Verschelde2022-10-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Outright disable spammy warnings due to past or present GCC bugs: * `-Wno-strict-overflow` for GCC 7. * `-Wno-type-limits` for GCC before 11 (regressed in 9/10, might work in earlier releases but at this stage we don't care). * `-Wno-return-type` for GCC 12/13 (regression, still not fixed). - Enable extra warnings conditionally when broken on earlier GCC: * `-Wnoexcept` was removed due to an upstream regression in GCC 9, could be re-enabled (but commented out for now as we actually have `-Wnoexcept` warnings to fix. * `-Wlogical-op` was broken on our variadic templates before GCC 11, now seems fine.
* | Merge pull request #64815 from RandomShaper/default_cpu_countRémi Verschelde2022-10-062-6/+0
|\ \ | | | | | | | | | Improve default `OS`'s CPU count getter
| * | Keep a single, portable implementation of `OS::get_processor_count()`Pedro J. Estébanez2022-10-052-6/+0
| | |
* | | Merge pull request #66720 from qarmin/unintialized_memoryRémi Verschelde2022-10-052-10/+10
|\ \ \ | | | | | | | | | | | | Remove usage of unitialized variables
| * | | Remove usage of unitialized variablesRafał Mikrut2022-10-012-10/+10
| | |/ | |/|
* | | Merge pull request #64819 from RandomShaper/enhance_thread_funcsRémi Verschelde2022-10-051-1/+1
|\ \ \ | | | | | | | | | | | | Enhance portability of threading
| * | | Enhance portability of threadingPedro J. Estébanez2022-10-041-1/+1
| | | |
* | | | Merge pull request #66807 from ↵Rémi Verschelde2022-10-047-53/+23
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | akien-mga/core-unix-remove-NO_FCNTL-and-NO_STATVFS Unix: Remove now unnecessary I/O defines, cleanup
| * | | Unix: Remove now unnecessary I/O defines, cleanupRémi Verschelde2022-10-037-53/+23
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `LIBC_FILEIO_ENABLED` wasn't defined anywhere, even in _other platforms_. - `NO_NETWORK` is also never defined. It probably isn't enough anyway to disable network APIs in the current codebase. - `UNIX_SOCKET_UNAVAILABLE` is never defined in this code but used by some other platforms, clarify that. - `NO_STATVFS` can be removed as Android supports it since API level 19, which is our current min SDK level. It's also only used for `DirAccessUnix::get_space_left()` which is anyway overridden by `DirAccessJAndroid::get_space_left()` so it shouldn't make a difference. * Fixed documentation for `DirAccess.get_space_left()`. - `NO_FCNTL` is likely also a remnant of early Android days, in current NDK r23 it seems to be available. Also cleaned up unused `fcntl.h` includes. - `NO_ALLOCA` is never defined, and we use alloca in many places now.
* / | Remove NO_THREADS fallback code, Godot 4 requires thread supportRémi Verschelde2022-10-033-6/+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-232-6/+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.
* | Replace File/Directory with FileAccess/DirAccesskobewi2022-09-192-2/+2
|/
* Add get_distribution_name() and get_version() to OSMJacred2022-09-162-0/+10
| | | | | | supports: LinuxBSD, Windows, macOS, iOS, Android, UWP Co-authored-by: bruvzg
* Fixes #65377: get_datetime_* functions can return wrong valuesJames2022-09-102-19/+5
|
* Rename String `plus_file` to `path_join`Aaron Franke2022-08-292-19/+19
|
* [Web] Rename JavaScript platform to Web.Fabio Alessandrelli2022-08-292-4/+4
| | | | Also rename export name from "HTML5" to "Web".
* [Net] IP uses print_verbose when getaddrinfo fails.Fabio Alessandrelli2022-08-051-2/+2
| | | | | | Avoid spamming errors when network is disconnected. Returned address will be invalid, so it can be checked by the user via `ret.is_valid_ip_address`.
* Add override keywords to DirAccess derived classesMarcel Admiraal2022-08-021-23/+23
|
* Add override keywords to FileAccess derived classesMarcel Admiraal2022-08-021-19/+19
|
* Code quality: Fix header guards consistencyRémi Verschelde2022-07-259-14/+17
| | | | | Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
* Rename OSX to macOS and iPhoneOS to iOS.bruvzg2022-07-211-1/+1
|
* Allows parsing of invalid UTF-16 surrogates (can be encountered in Windows ↵bruvzg2022-07-072-3/+8
| | | | filenames) and some non-standard UTF-8 variants, makes Unicode parse errors more verbose.
* Add Desktop to file dialog drive on UnixShlomi2022-07-051-4/+13
|
* Add full support for Android scoped storage.Fredia Huya-Kouadio2022-07-054-12/+1
| | | | | This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer. This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
* Replace most uses of Map by HashMapreduz2022-05-163-8/+8
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Add OS::is_process_running function.mdavisprog2022-05-032-0/+10
| | | | | | | | 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.
* Merge pull request #60601 from touilleMan/gdextension_get_library_pathRémi Verschelde2022-05-032-2/+7
|\ | | | | Add GDNativeInterface::get_library_path to GDExtension
| * Add GDNativeInterface::get_library_path to GDExtensionEmmanuel Leblond2022-04-292-2/+7
| |
* | Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-021-2/+2
|/ | | | | | | | | | | 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.
* Remove or make private `FileAccess` `close()` methods.bruvzg2022-04-122-7/+4
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-114-6/+6
|
* Zero initialize all pointer class and struct membersRémi Verschelde2022-04-041-1/+1
| | | | | This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
* Remove unused GDNative codeRémi Verschelde2022-03-091-2/+2
| | | | | | | | | This has been superseded by GDExtension so this code is no longer useful nor usable. There's still some GDNative-related stuff in platform export code which needs to be adapted for GDExtension (e.g. to include GDExtension libraries in exports).
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-166-33/+44
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* [OS/Crypto] Add get_entropy to OS.Fabio Alessandrelli2022-02-142-10/+41
| | | | | | | | | | | | | | | 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.
* [Net] Simplify IP resolution code, fix caching.Fabio Alessandrelli2022-01-291-1/+1
| | | | | | | | | | First, we should not insert into cache if the hostname resolution has failed (as it might be a temporary internet issue), second, the async resolver should also properly insert into cache. Took the chance to remove some duplicate code with critical section in it at the cost of little performance when calling the blocking resolve_hostname function.
* Merge pull request #56012 from bruvzg/wt🤎4Rémi Verschelde2022-01-172-4/+4
|\
| * [Windows] Improve console handling and execute/create_process.bruvzg2021-12-182-4/+4
| | | | | | | | | | | | | | | | | | | | Always build with the GUI subsystem. Redirect stdout and stderr output to the parent process console. Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with `create_process`). Add `open_console` argument to the `execute` and `create_process` to open a new console window. Remove `interface/editor/hide_console_window` editor setting. Remove `Toggle System Console` menu option. Remove `set_console_visible` and `is_console_visible` functions.
* | Update copyright statements to 2022Rémi Verschelde2022-01-0314-28/+28
|/ | | | Happy new year to the wonderful Godot community!
* Add / to the unix shortcut drive listHaoyu Qiu2021-12-152-0/+17
| | | | Also made `get_current_drive()` to pick the longest match on Unix.
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-093-6/+6
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Only print message for `get_modified_time()` failure when in verbose modeHugo Locurcio2021-12-011-1/+2
| | | | | | | | This error message was often displayed for no good reason when PCK files were loaded in the editor. Since file modification dates are secondary metadata, it's not very important if it can't be retrieved successfully anyway.
* Fix console colors on WindowsYuri Roubinsky2021-11-261-1/+1
|
* Fix data directory of unnamed projectskobewi2021-11-181-1/+1
|
* Update Time documentationAaron Franke2021-10-282-6/+6
|