Commit Graph

238 Commits

Author SHA1 Message Date
3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
9f8626ccaa [Windows] Try reading GPU driver information directly from registry. 2025-08-06 08:01:05 +03:00
0b3496fb4f Add support for SDL3 joystick input driver
Made possible by EIREXE, xsellier and the SDL team.

This commit includes statically linked SDL3 for Windows, Linux and macOS.
The vendored copy of SDL3 was setup to only build the required subsystems
for gamepad/joystick support, with some patches to be able to make it as
minimal as possible and reduce the impact on binary size and code size.

Co-authored-by: Álex Román Núñez <eirexe123@gmail.com>
Co-authored-by: Xavier Sellier <xsellier@gmail.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-06-25 01:28:50 +02:00
98f377d9d0 Use system timer/wait functions for frame delay when screen reader is active. 2025-06-04 13:44:02 +03:00
820380817a Exclude RD creation test functions from templates 2025-05-15 10:12:38 +02:00
01fc9aee6c Core: Modernize C headers with C++ equivalents 2025-05-02 08:23:01 -05:00
48bfe13e4f Add methods to decode/encode multibyte encodings. 2025-03-28 17:32:34 +02:00
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
6ed12bfc5d [Linux/BSD] Offload RenderingDevice creation test to subprocess. 2025-03-04 13:18:26 +02:00
ab717497ef [Windows] Offload RenderingDevice creation test to subprocess. 2025-02-24 19:40:10 +02:00
b77aa473a1 Implement a "Recovery Mode" for recovering crashing/hanging projects during initialization 2025-01-03 10:50:15 +00:00
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
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
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
b57ceefec1 [Windows] Improve frame pacing by busy waiting as needed 2024-11-29 14:04:18 +01:00
1dcb686325 Merge pull request #99026 from Faless/net/split_ip
[Net] Split Unix/Windows IP implementation
2024-11-18 09:23:43 -06:00
179321a0a3 Merge pull request #91201 from bruvzg/con_type
[OS] Add functions to determine standard I/O device type.
2024-11-12 12:13:12 -06:00
190670d16b Merge pull request #99107 from RandomShaper/win_less_inheritance
Windows: Avoid child processes inheriting all file handles
2024-11-12 12:13:06 -06:00
168a2a1466 [Net] Split Unix/Windows IP implementation 2024-11-12 17:33:47 +01:00
7fcf3c491d Windows: Avoid child processes inheriting all file handles 2024-11-12 12:25:28 +01:00
a6dfd1cf6e Implement get_model_name on macOS and Windows. 2024-11-12 10:34:24 +02:00
76164c2aa9 [OS] Add functions to determine standard I/O device type. 2024-11-06 13:33:38 +02:00
10f3c1f587 Add support for non-blocking IO mode to OS.execute_with_pipe. 2024-09-06 14:16:39 +03:00
4091abd727 Respect integrated GPU preference in Windows Settings 2024-07-16 23:46:37 +08:00
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
ede88cf59d Fix loading GDExtension dependencies on Android 2024-04-19 07:55:08 -07:00
dce4a3e4c2 Add get_process_exit_code() method 2024-04-16 12:46:15 +02:00
b73e740786 Add renaming of PDB files to avoid blocking them 2024-04-05 00:14:23 +03:00
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
9903e6779b Enforce template syntax typename over class 2024-03-07 22:39:09 -06:00
a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 -03:00
73eff10c76 Finish splitting functionality of the Vulkan and D3D12 backends into RenderingDeviceDriver. 2024-02-12 10:02:18 -03:00
12a519bae2 Split RenderingDevice into API-agnostic and RenderingDeviceDriver parts
Credit and thanks to @bruzvg for multiple build fixes, update of 3rd-party items and MinGW support.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-12-20 19:18:08 +01:00
2f47c57385 Add Direct3D 12 RenderingDevice implementation 2023-12-12 19:10:04 +01:00
9e4315bb50 Style: Harmonize header includes in platform ports
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module should be included with relative
paths (relative to the root folder of the modular component, e.g.
`platform/linuxbsd/`), in their own section before Godot's "core" includes.

The `api` and `export` subfolders also need to be handled as self-contained
(and thus use relative paths for their "local" includes) as they are all
compiled for each editor platform, without necessarily having the api/export
matching platform folder in the include path.
E.g. the Linux editor build will compile `platform/android/{api,export}/*.cpp`
and those need to use relative includes for it to work.
2023-06-08 15:19:19 +02:00
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
76d33d187f Merge pull request #69698 from Daylily-Zeleen/daylily-zeleen/show_in_explorer
Implement and expose OS::shell_show_in_file_manager()
2023-04-25 09:57:27 +02:00
b12ced0a26 Implement and expose OS::shell_show_in_file_manager() 2023-04-25 11:29:32 +08:00
628f3b2f79 [OS] Implement and expose to scripting APIs get_memory_info method instead of old get_free_static_memory. 2023-04-24 14:08:55 +03:00
818a9e99a4 OS: Add unset_environment, better validate input
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-16 16:39:44 +01:00
0e4e782ada Merge pull request #70714 from Calinou/doc-os-stdin
Improve documentation for `OS.read_string_from_stdin()`
2023-01-12 09:24:47 +01:00
86b8176864 Improve documentation for OS.read_string_from_stdin()
This makes it clearer that calls to this method are blocking.

The unused method parameter was also removed.
2023-01-11 19:57:25 +01:00
d95794ec8a One Copyright Update to rule them all
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".
2023-01-05 13:25:55 +01:00
ecec415988 Use system fonts as fallback and improve system font handling.
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-04 18:44:20 +02:00
9a33c97c2a Add console wrapper app to handle console i/o redirection on Windows. 2022-10-31 14:37:49 +02:00
5aadc618b6 Merge pull request #66102 from MJacred/feature/getvideoadapterdriverinfo
Fetch video adapter driver name and version from OS
2022-10-11 13:59:53 +02:00
de768afbdc Fetch video adapter driver name and version from OS on Linux/*BSD and Windows 2022-10-11 12:39:41 +02:00
a92c564a02 Cleanup unused defines in platform code 2022-10-11 11:52:41 +02:00
c2c9a582da Merge pull request #64815 from RandomShaper/default_cpu_count
Improve default `OS`'s CPU count getter
2022-10-06 08:55:51 +02:00
6bf02c0162 Keep a single, portable implementation of OS::get_processor_count() 2022-10-05 20:10:47 +02:00