Commit Graph

587 Commits

Author SHA1 Message Date
c231c8c41d Fix "Unexpected NUL character" errors on Wine. 2025-11-07 08:08:12 +02:00
5935a32e32 Core: Cleanup headers in core/config
- `MainLoop` now forward-declared in `OS`
2025-10-06 09:20:56 -05:00
d1d28c0bcf Merge pull request #111223 from Ivorforce/remove-iterator-include
Replace `std::size` usage with `std_size` to avoid `<iterator>` include.
2025-10-06 09:06:49 -05:00
1db0a60dc0 Replace std::size usage with std_size to avoid <iterator> include. 2025-10-05 00:26:11 +02:00
3d1c9fd5de Move server files into their subfolders 2025-09-30 19:39:39 -07:00
5316d12588 Merge pull request #109346 from bruvzg/win_drv_chk
[Windows] Try reading GPU driver information directly from registry.
2025-09-16 09:48:52 -05:00
274f88c5b8 [Windows] Fix color picker on old versions of Windows 10. 2025-08-18 09:23:31 +03: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
b13a0e1834 Rename String::resize to resize_uninitialized, to better communicate to callers that new characters must be initialized. 2025-06-11 18:13:02 +02:00
98f377d9d0 Use system timer/wait functions for frame delay when screen reader is active. 2025-06-04 13:44:02 +03:00
617e12a6b4 [Windows] Drop support for Windows 7/8/8.1. 2025-05-30 17:30:23 +03:00
d79258c2e7 Fix: Windows OS.get_unique_id() null termination issue
use ascii for encoding-neutral
check buffer size as well
2025-05-23 15:05:41 -05:00
820380817a Exclude RD creation test functions from templates 2025-05-15 10:12:38 +02:00
53bee4eb56 Windows: Restrict time API use to the desktop flavor 2025-05-15 10:12:16 +02:00
2e61c7773b Fix OS_Windows::get_video_adapter_driver_info() 2025-04-18 19:11:40 -04:00
889410dcda Add String::replace_char(s) methods for performance and convenience 2025-04-10 13:08:45 +02:00
207a2b6472 Core: Integrate warning suppression macro helpers 2025-04-03 10:13:46 -05:00
48bfe13e4f Add methods to decode/encode multibyte encodings. 2025-03-28 17:32:34 +02:00
a23f630781 Remove String clipping constructors.
Callers should instead call constructors with explicit encoding names, with known length `Span`.
2025-03-15 12:34:44 +01:00
97ee05e9b7 Rename version defines to GODOT_VERSION_* to match GDExtension godot-cpp 2025-03-12 11:11:38 -07:00
331a43a9d8 Add String::remove_char(s) methods for performance and convenience 2025-03-10 13:19:28 +01:00
2324805fdc Merge pull request #103773 from Calinou/windows-low-processor-mode-sleep-cpu
Use more efficient sleep approach on Windows when low-processor mode is enabled
2025-03-09 09:05:27 -05:00
c937b6d180 Merge pull request #102419 from Ivorforce/std-size
Use `std::size` instead of `sizeof(a) / sizeof(a[0])` pattern throughout the codebase.
2025-03-07 15:12:25 -06:00
03b4e0dd58 Use more efficient sleep approach on Windows when low-processor mode is enabled
This aims to fix the idle CPU utilization regression from 4.3 to 4.4
by reverting to the previous approach, but only when low-processor mode
is enabled.
2025-03-07 18:06:41 +01:00
6ed12bfc5d [Linux/BSD] Offload RenderingDevice creation test to subprocess. 2025-03-04 13:18:26 +02:00
ddd807ff7d Add (void *) cast directly to GetProcAddress calls. 2025-02-27 12:30:04 +02:00
ab717497ef [Windows] Offload RenderingDevice creation test to subprocess. 2025-02-24 19:40:10 +02:00
e34f1f504c Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase. 2025-02-07 14:57:48 +01:00
b38103e95d Windows: Normalize slashes in return of OS.get_temp_dir() 2025-01-30 22:02:20 +01:00
b77aa473a1 Implement a "Recovery Mode" for recovering crashing/hanging projects during initialization 2025-01-03 10:50:15 +00:00
9300c2bdc9 Merge pull request #100400 from CrabNickolson/windows-thread-names
Add support for thread naming on windows platform
2024-12-19 19:59:41 -06: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
d848835f8c Add support for thread naming on windows platform 2024-12-14 14:42:39 +01:00
a607bca2fd Merge pull request #100024 from Ivorforce/optimize-string-single-char
Optimize string single char contains calls.
2024-12-09 14:33:24 -06:00
b5c31ebb41 Add contains_char() for single-character 'contains' calls. 2024-12-06 20:23:35 +01:00
35faf99755 windows: Fix underflow before delay_usec 2024-12-04 23:54:53 -08: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
0045b1a513 Merge pull request #98862 from HuntJSparra/early-projsettings-registration
Register Engine, OS, ProjectSettings, and Time singletons in time for for `INITIZATION_LEVEL_CORE`
2024-11-26 13:04:51 -06:00
0d88737a9f Merge pull request #99542 from bruvzg/stdin_str
Convert line breaks to `\n` and strip line break from the end of string returned by `OS::read_string_from_stdin`/`OS::get_stdin_string`.
2024-11-25 13:22:30 -06:00
8e1a6ea431 Revert "Make delay_usec more precise"
This reverts commit df3367f334.

Fixes #99593.
2024-11-25 19:43:21 +01:00
e9b57fce82 Convert line breaks to \n and strip line break from the end of string returned by OS::read_string_from_stdin/OS::get_stdin_string. 2024-11-23 15:11:50 +02:00
48fbe4172b Register Engine, OS, ProjectSettings, and Time early. 2024-11-21 18:09:03 -05:00
449d90b64e Merge pull request #99178 from mrsaturnsan/windows_sleep_precision
Make `delay_usec` more precise on Windows to fix framepacing
2024-11-18 09:23:50 -06: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
8bb3e5360e Disable Nahimic code injection. 2024-11-18 13:00:55 +02:00
df3367f334 Make delay_usec more precise
Comment fix
2024-11-16 09:15:46 -06:00
287b7543a0 Fix 32-bit Windows build. 2024-11-15 15:49:08 +02:00