1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

309 Commits

Author SHA1 Message Date
Thaddeus Crews
5935a32e32 Core: Cleanup headers in core/config
- `MainLoop` now forward-declared in `OS`
2025-10-06 09:20:56 -05:00
Pāvels Nadtočajevs
838cb0eefc [macOS] Add support for exporting macOS 26 Liquid Glass icons. 2025-07-28 14:35:48 +03:00
Rémi Verschelde
bb9d6d0d02 Merge pull request #107113 from mihe/macos-open-in-program
Add `OS::open_with_program` for opening files/directories with a specific program on macOS
2025-06-05 13:13:49 +02:00
Mikael Hermansson
f610c81943 Add OS::open_with_program for opening files/directories with a specific program on macOS
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2025-06-05 10:12:01 +02:00
Pāvels Nadtočajevs
98f377d9d0 Use system timer/wait functions for frame delay when screen reader is active. 2025-06-04 13:44:02 +03:00
bruvzg
ee181951b6 [macOS] Add support for loading shell environment from UI apps. 2025-06-03 18:27:29 +03:00
Thaddeus Crews
5538850d87 Core: Convert Pair/KeyValue to constexpr 2025-05-15 10:37:41 -05:00
Pedro J. Estébanez
820380817a Exclude RD creation test functions from templates 2025-05-15 10:12:38 +02:00
Thaddeus Crews
01fc9aee6c Core: Modernize C headers with C++ equivalents 2025-05-02 08:23:01 -05:00
reduz
d1dcb40d56 Ability to print and log script backtraces
Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
2025-04-24 18:54:41 +02:00
bruvzg
48bfe13e4f Add methods to decode/encode multibyte encodings. 2025-03-28 17:32:34 +02:00
Thaddeus Crews
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
Pāvels Nadtočajevs
6ed12bfc5d [Linux/BSD] Offload RenderingDevice creation test to subprocess. 2025-03-04 13:18:26 +02:00
Pāvels Nadtočajevs
ab717497ef [Windows] Offload RenderingDevice creation test to subprocess. 2025-02-24 19:40:10 +02:00
Jānis Kiršteins
0e266b0099 [iOS] Sync the boot splash and the launch screen image scale modes 2025-02-12 17:41:18 +01:00
Ricardo Subtil
b77aa473a1 Implement a "Recovery Mode" for recovering crashing/hanging projects during initialization 2025-01-03 10:50:15 +00:00
Rémi Verschelde
b34adf29dc Remove unused OS _display_driver_id member 2025-01-03 01:52:25 +01:00
Rémi Verschelde
a11364d1e6 Merge pull request #99010 from Hilderin/embedding-game-process
Embed game process in editor
2024-12-20 23:56:43 +01:00
Hilderin
9d2a4c03be Embedding game process in editor 2024-12-18 17:52:42 -05:00
Yufeng Ying
be86ce3103 Apply iwyu suggestion in core. 2024-12-19 00:43:47 +08:00
Hugo Locurcio
928982891e Add OS.get_version_alias() to return a human-readable Windows/macOS version number
Windows 11's major version number is actually 10.x.x, which can be confusing
if you don't know about this quirk. `OS.get_version_alias()` avoids this
by displaying the "branding" version number and the build number as a suffix,
so that individual updates can still be distinguished from each other.

On macOS, `OS.get_version_alias()` returns the version number prepended
with the version name (e.g. Sequoia for macOS 15).

On other operating systems, this returns the same value as `OS.get_version()`.
2024-12-14 18:47:50 +01:00
Thaddeus Crews
156bc92282 Merge pull request #98397 from adamscott/add-tmp-support
Add temp utilities (alias `OS::get_temp_dir()`, `FileAccess::create_temp()`, and `DirAccess::create_temp()`)
2024-12-03 14:40:59 -06:00
Thaddeus Crews
a135a6478a Merge pull request #98383 from RandomShaper/deprecate_unsafe_th_rend
Deprecate the pointless unsafe threading model for rendering
2024-12-03 14:40:56 -06:00
Adam Scott
1b3e483899 Add file and dir temporary utilities
Co-authored by @Alex2782 for the Android bindings.
Many thanks to the reviewers also.

Co-authored-by: Alex <alex.hart.278@gmail.com>
2024-12-02 12:08:14 -05:00
Pedro J. Estébanez
a46ea9d064 Deprecate the pointless unsafe threading model for rendering 2024-11-14 10:43:29 +01:00
bruvzg
76164c2aa9 [OS] Add functions to determine standard I/O device type. 2024-11-06 13:33:38 +02:00
Adam Scott
0d350e7108 Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
Yevhen Babiichuk (DustDFG)
af6d260c17 Don't include core/io/image.h in core/os/os.h
`core/os/os.h` doesn't use `core/io/image.h`. It just brings
transitive dependencies. Lots of dependencies because `core/os/os.h`
is transitively included in almost every file of godot

Also added `core/io/image.h` into files^1 where `Ref<Image>` and `core/os/os.h`
were used to prevent obscure errors involving `Ref<Image>`

^1 except those which include `core/io/image_loader.h` or `core/io/image.h` by
corresponding .h file with the same name

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-10-18 19:04:19 +03:00
bruvzg
10f3c1f587 Add support for non-blocking IO mode to OS.execute_with_pipe. 2024-09-06 14:16:39 +03:00
bruvzg
d4e78b8db5 Store GLES over GL status in the OS to avoid direct renderer includes in the editor. 2024-09-03 16:11:59 +03:00
bruvzg
c273786758 Update rendering driver name on fallbacks. Fix rendering driver/method in the editor system info. 2024-09-01 18:22:40 +03:00
Rémi Verschelde
330fca1ffd Merge pull request #93985 from alvinhochun/windows-gpu-pref
Respect integrated GPU preference in Windows Settings
2024-08-28 00:11:45 +02:00
Alvin Wong
4091abd727 Respect integrated GPU preference in Windows Settings 2024-07-16 23:46:37 +08:00
Jamie Pate
b18e1e0dcd Fix Game window stops responding when debugger pauses
Fixes #73374

As of godot 4 On windows/osx the game window will be frozen and will not
be updated.

In the debugger loop it calls

OS::get_singleton()->process_and_drop_events();
which allows windows/osx to handle system events. If the window doesn't
handle these events then both systems will judge the window to be 'not
responding' (osx beachball cursor)

When the event processing code was migrated from OS to DisplayServer the
process_and_drop_events() logic was moved to DisplayServer, but the call
inside the remote debugger pause loop was not updated to call the
DisplayServer version, there are currently no implementations of
OS::process_and_drop_events() so i removed it and switched to the new
DisplayServer::force_process_and_drop_events() method.
2024-07-10 13:38:57 -07:00
Radiant
789c6ebdfd Implement amplitude to Input.vibrate_handheld
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: m4gr3d <m4gr3d@users.noreply.github.com>
2024-05-02 19:09:42 +03:00
kobewi
3ebb5b84a0 Add separate feature tags for editor runtime 2024-04-26 14:44:38 +02:00
Fredia Huya-Kouadio
764de7fe31 Collapse the gdextension arguments into the GDExtensionData struct
This is used to reduce the number of arguments to `OS::open_dynamic_library(...)`.
2024-04-19 07:56:02 -07:00
Fredia Huya-Kouadio
ede88cf59d Fix loading GDExtension dependencies on Android 2024-04-19 07:55:08 -07:00
kobewi
dce4a3e4c2 Add get_process_exit_code() method 2024-04-16 12:46:15 +02:00
DmitriySalnikov
b73e740786 Add renaming of PDB files to avoid blocking them 2024-04-05 00:14:23 +03:00
bruvzg
082b420c0a Implement OS.execute_with_pipe method to run process with redirected stdio.
Implement `pipe://*` path handling for creation of named pipes.
2024-03-27 11:41:16 +02:00
Rémi Verschelde
023dcd44c1 Refactor OS exit code to be EXIT_SUCCESS by default
- `Main::setup` early exits (failure or `--help`/`--version`) now
  consistently return `EXIT_FAILURE` or `EXIT_SUCCESS` on all platforms,
  instead of 255 on some and a Godot Error code on others.
- `Main::start` now returns the exit code, simplifying the handling of early
  failures.
- `Main::iteration` needs to explicit set the exit code in OS if it errors
  out.
- Web and iOS now properly return `OS::get_exit_code()` instead of 0.
2024-03-08 23:31:24 +01:00
Muller-Castro
a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 -03:00
Yuri Sizov
fc3f40f37d Improve engine startup/shutdown benchmarks
- Add contexts to give a better sense of benchmarked areas.
- Add missing benchmarks and adjust some begin/end points.
- Clean up names.
- Improve Android's internal benchmarks in a similar manner.

Co-authored-by: Fredia Huya-Kouadio <fhuya@meta.com>
2023-12-08 12:53:04 +01:00
Fredia Huya-Kouadio
8cc7739197 Godot Android plugin re-architecture 2023-09-03 17:04:10 -07:00
bruvzg
4790da7900 [macOS] Implement optional native file selection dialog support for sandboxed apps. 2023-07-12 22:36:24 +03:00
Fredia Huya-Kouadio
831b4a5366 Improve startup benchmarking
Move the benchmarking measuring methods from `Engine` to `OS` to allow for platform specific overrides (e.g: can be used to hook into platform specific benchmarking and tracing capabilities).
2023-05-23 13:22:35 -07:00
lawnjelly
7925670f81 Add frame delta smoothing option (4.x)
Frame deltas are currently measured by querying the OS timer each frame. This is subject to random error. Frame delta smoothing instead filters the delta read from the OS by replacing it with the refresh rate delta wherever possible.

This PR also contains code to estimate the refresh rate based on the input deltas, without reading the refresh rate from the host OS.

The delta_smooth_enabled setting can also be modified at runtime through OS::, and there is also now a command line setting to override the project setting.
2023-05-16 13:57:25 +01:00
Fabio Alessandrelli
6fd9982358 [TLS] Add support for platform-specific CA bundles.
Adds a new OS::get_system_ca_certs method which can be implemented by
platforms to retrieve the list of trusted CA certificates using OS
specific APIs.

The function should return the certificates in PEM format, and is
currently implemented for Windows/macOS/LinuxBSD(*)/Android.

mbedTLS will fall back to bundled certificates when the OS returns no
certificates.

(*) LinuxBSD does not have a standardized certificates store location.
    The current implementation will test for common locations and may
    return an empty string on some distributions (falling back to the
    bundled certificates).
2023-05-12 09:58:23 +02:00
Juan Linietsky
273a6eeb66 Redo how the remote filesystem works
Instead of reading files over the network, the new version uses a local file cache and only updates files when it changes.

The original remote filesystem was created 14 years ago, when ethernet was faster than hard drives or even flash. Also, mobile devices have a very small amount of storage.
Nowadays, this is no longer the case so the approach is changed to using a persistent cache in the target device.

Co-authored-by: m4gr3d
2023-05-08 11:57:54 +02:00