Commit Graph

548 Commits

Author SHA1 Message Date
mrsaturnsan
b57ceefec1 [Windows] Improve frame pacing by busy waiting as needed 2024-11-29 14:04:18 +01:00
Thaddeus Crews
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
Thaddeus Crews
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
Rémi Verschelde
8e1a6ea431
Revert "Make delay_usec more precise"
This reverts commit df3367f334.

Fixes #99593.
2024-11-25 19:43:21 +01:00
Pāvels Nadtočajevs
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
Hunt J. Sparra
48fbe4172b Register Engine, OS, ProjectSettings, and Time early. 2024-11-21 18:09:03 -05:00
Thaddeus Crews
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
Thaddeus Crews
1dcb686325
Merge pull request #99026 from Faless/net/split_ip
[Net] Split Unix/Windows IP implementation
2024-11-18 09:23:43 -06:00
bruvzg
8bb3e5360e Disable Nahimic code injection. 2024-11-18 13:00:55 +02:00
mrsaturnsan
df3367f334 Make delay_usec more precise
Comment fix
2024-11-16 09:15:46 -06:00
Pāvels Nadtočajevs
287b7543a0 Fix 32-bit Windows build. 2024-11-15 15:49:08 +02:00
Thaddeus Crews
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
Thaddeus Crews
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
Fabio Alessandrelli
168a2a1466 [Net] Split Unix/Windows IP implementation 2024-11-12 17:33:47 +01:00
Thaddeus Crews
cb286da1dd
Merge pull request #99112 from bruvzg/get_model_name
Implement `get_model_name` on macOS and Windows.
2024-11-12 09:27:52 -06:00
Pedro J. Estébanez
7fcf3c491d Windows: Avoid child processes inheriting all file handles 2024-11-12 12:25:28 +01:00
Pāvels Nadtočajevs
a6dfd1cf6e Implement get_model_name on macOS and Windows. 2024-11-12 10:34:24 +02:00
Fabio Alessandrelli
0c620b29cd [Net] Split Unix/Windows NetSocket implementation 2024-11-10 16:13:50 +01:00
bruvzg
76164c2aa9
[OS] Add functions to determine standard I/O device type. 2024-11-06 13:33:38 +02:00
Thaddeus Crews
bb5f390fb9
Style: Apply clang-tidy fixes (superficial)
• `modernize-use-bool-literals`, `modernize-use-nullptr`, and `readability-braces-around-statements`
2024-11-04 12:11:14 -06: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
Rémi Verschelde
2c8ab6e7eb
Merge pull request #94839 from alvinhochun/win-set-console-mode
Combine existing modes when calling SetConsoleMode
2024-09-18 11:15:22 +02:00
bruvzg
2c991a727b [Windows] Only use long executable path when necessary, fix broken apksigner detection. 2024-09-10 10:34:44 +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
319bfa9965
[Windows] Use the same API for all OS_Windows::*_environment functions. 2024-09-03 16:02:35 +03:00
bruvzg
d528f28275 [Windows] Fix OS.open_dynamic_library 2024-08-28 20:12:09 +03:00
bruvzg
ae334e069c
[Windows] Always use absolute UNC paths and long path aware APIs, add "long path aware" flag to the application manifest. 2024-08-28 11:15:57 +03:00
Rémi Verschelde
96159ebc5d
Merge pull request #96192 from dsnopek/windows-gdext-adddlldirectory
Windows: Call `AddDllDirectory()` with an absolute path
2024-08-28 09:45:35 +02:00
David Snopek
e8bd385f53 Windows: Call AddDllDirectory() with an absolute path 2024-08-27 17:38:30 -05: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
Sébastien Dunne Fulmer
c3ed8a842c
Remove confusing USER prefix from script-logged errors 2024-08-27 15:00:48 +01:00
Joel Croteau
f44d6a235f Fix reload of GDExtension libraries in framework package on macos
`GDExtension::open_library` has a check in it to see if the library was loaded
from a temp file, and if it was to restore the original name as that is the one
we actually care about. This check is breaking extension reloading on Mac when
the library path is to a framework folder, as the file inside the framework
will not generally be the same name as the folder.

This check also shouldn't be necessary even on Windows, which is the only
platform that uses `generate_temp_files`, since disposal of the created temp
file is handled within `OS_Windows::open_dynamic_library`, and
`GDExtension::open_library` (which is the only function to call
`open_dynamic_library` with a `p_data` argument) only cares about the original
library file path and has to do extra work to remove the name of the temp file.
Instead, I have removed that check and set `OS_Windows::open_dynamic_library`
to return the name of the original file and not the name of the copy.

This fixes GDExtension reloading on macOS. I do not have a Windows machine
available to test that it still works properly on Windows, so someone should
check that before merging this.
2024-08-08 08:31:49 -06:00
Alvin Wong
28c60a5ff9 Combine existing modes when calling SetConsoleMode
Otherwise the default modes will be cleared, which causes long lines to
be truncated in some terminals (e.g. Windows Terminal).
2024-07-28 00:32:40 +08:00
Alvin Wong
88581a7705 Support GPU preference for MS Store packaged apps 2024-07-16 23:46:37 +08:00
Alvin Wong
4091abd727 Respect integrated GPU preference in Windows Settings 2024-07-16 23:46:37 +08:00
Rémi Verschelde
c349f0d6a7
Remove unused is_wow64 method in OS_Windows
It was added in b4d369c88 for `get_processor_count`, but this was later
changed to rely on `std::thread` in 6bf02c016.
2024-07-11 23:16:12 +02:00
bruvzg
874814794b [Windows] Improve console IO redirection. 2024-04-27 00:40:17 +03: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
Thaddeus Crews
3b3e2374c9
clang-tidy: Enforce modernize-use-nullptr 2024-03-12 10:59:53 -05:00
Muller-Castro
a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 -03:00
Rémi Verschelde
37df2ff387
Merge pull request #86682 from Daylily-Zeleen/daylily-zeleen/distinguish_between_dynamic_libaray_not_found_and_can't_open
Distinguish between dynamic library not found and can't be opened.
2024-01-02 18:06:17 +01:00
Daylily-Zeleen
fe6b073811 Distinguishs between dynamic library not found and can't be opened. 2024-01-01 20:01:57 +08:00
Septian
475c2fa1e7 Fix OS.get_system_font_path and OS.get_system_font_path_for_text to return correct value 2023-12-27 23:19:43 +07:00
A Thousand Ships
3565d1bf7e [Drivers,Platform] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-12 20:13:32 +02:00
Brecht Kuppens
5608b1d411
Windows: Always double-quote path when launching explorer.exe to browse
Code now always double quotes the filename to use as command line
argument when calling explorer.exe. In particular, commas in a filename
would be interpreted by explorer.exe as separators for commands.

Similarly a trim_suffix for "file://" is assumed to be a mistake, this
could potentially be a PREfix that we want to strip, but never a suffix.
Since it didn't seem needed in the end, we removed it.
2023-08-28 12:46:50 +02:00
bruvzg
4bfb820d32 [Windows] Initialize COM as apartment-threaded. 2023-07-20 12:14:16 +03:00