summaryrefslogtreecommitdiffstats
path: root/platform/windows/os_windows.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@711c725cf1b641d05d6cc988a64601622e48fe4aSpartan3222024-11-151-1/+1
|\
| * Windows: Avoid child processes inheriting all file handlesPedro J. Estébanez2024-11-121-1/+1
| |
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotSpartan3222024-10-131-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e8542b06acca3c1bdeee4b528411771f0819f084) Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Collapse the gdextension arguments into the `GDExtensionData` structFredia Huya-Kouadio2024-04-191-1/+1
| | | | This is used to reduce the number of arguments to `OS::open_dynamic_library(...)`.
* Fix loading GDExtension dependencies on AndroidFredia Huya-Kouadio2024-04-191-1/+1
|
* Add get_process_exit_code() methodkobewi2024-04-161-0/+4
|
* Add renaming of PDB files to avoid blocking themDmitriySalnikov2024-04-051-1/+4
|
* Implement `OS.execute_with_pipe` method to run process with redirected stdio.bruvzg2024-03-271-0/+1
| | | | Implement `pipe://*` path handling for creation of named pipes.
* Enforce template syntax `typename` over `class`Thaddeus Crews2024-03-071-1/+1
|
* Add const lvalue ref to core/* container parametersMuller-Castro2024-02-141-3/+3
|
* Finish splitting functionality of the Vulkan and D3D12 backends into ↵Dario2024-02-121-7/+0
| | | | RenderingDeviceDriver.
* Split RenderingDevice into API-agnostic and RenderingDeviceDriver partsPedro J. Estébanez2023-12-201-4/+5
| | | | | | 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>
* Add Direct3D 12 RenderingDevice implementationPedro J. Estébanez2023-12-121-0/+4
|
* Style: Harmonize header includes in platform portsRémi Verschelde2023-06-081-3/+5
| | | | | | | | | | | | | | | | 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.
* [TLS] Add support for platform-specific CA bundles.Fabio Alessandrelli2023-05-121-0/+2
| | | | | | | | | | | | | | | | | 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).
* Merge pull request #69698 from Daylily-Zeleen/daylily-zeleen/show_in_explorerRémi Verschelde2023-04-251-0/+1
|\ | | | | | | Implement and expose OS::shell_show_in_file_manager()
| * Implement and expose OS::shell_show_in_file_manager()Daylily-Zeleen2023-04-251-0/+1
| |
* | [OS] Implement and expose to scripting APIs `get_memory_info` method instead ↵bruvzg2023-04-241-0/+2
|/ | | | of old `get_free_static_memory`.
* OS: Add `unset_environment`, better validate inputRémi Verschelde2023-01-161-1/+2
| | | | | | | | | 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
* Merge pull request #70714 from Calinou/doc-os-stdinRémi Verschelde2023-01-121-1/+1
|\ | | | | Improve documentation for `OS.read_string_from_stdin()`
| * Improve documentation for `OS.read_string_from_stdin()`Hugo Locurcio2023-01-111-1/+1
| | | | | | | | | | | | This makes it clearer that calls to this method are blocking. The unused method parameter was also removed.
* | One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
|/ | | | | | | | | | | | | | | | | | | | 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".
* Use system fonts as fallback and improve system font handling.bruvzg2022-12-041-1/+19
| | | | | | | 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.
* Add console wrapper app to handle console i/o redirection on Windows.bruvzg2022-10-311-0/+4
|
* Merge pull request #66102 from MJacred/feature/getvideoadapterdriverinfoRémi Verschelde2022-10-111-0/+2
|\ | | | | | | Fetch video adapter driver name and version from OS
| * Fetch video adapter driver name and version from OS on Linux/*BSD and WindowsMJacred2022-10-111-0/+2
| |
* | Cleanup unused defines in platform codeRémi Verschelde2022-10-111-7/+4
| |
* | Merge pull request #64815 from RandomShaper/default_cpu_countRémi Verschelde2022-10-061-1/+0
|\ \ | | | | | | | | | Improve default `OS`'s CPU count getter
| * | Keep a single, portable implementation of `OS::get_processor_count()`Pedro J. Estébanez2022-10-051-1/+0
| |/
* / Unix: Remove now unnecessary I/O defines, cleanupRémi Verschelde2022-10-031-1/+2
|/ | | | | | | | | | | | | | | | - `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.
* Add get_distribution_name() and get_version() to OSMJacred2022-09-161-0/+2
| | | | | | supports: LinuxBSD, Windows, macOS, iOS, Android, UWP Co-authored-by: bruvzg
* Fixes #65377: get_datetime_* functions can return wrong valuesJames2022-09-101-2/+1
|
* Remove unused force_quit variable from many OS abstractionsPedro J. Estébanez2022-08-271-1/+0
|
* Implement support for loading system fonts on Linux, macOS / iOS and Windows.bruvzg2022-07-261-0/+23
|
* Code quality: Fix header guards consistencyRémi Verschelde2022-07-251-1/+1
| | | | | Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
* Replace most uses of Map by HashMapreduz2022-05-161-1/+1
| | | | | | | | | | | | * 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!
* opengl3 driver now works on windows including multi windowderammo2022-05-111-0/+9
| | | | | | | | | | | | | | | | | | | | | fixed and simplified gl_manager_windows swap buffers now called for all windows fixed missing pixel format setting in additional windows this makes them work in OpenGL contexts changed verbose error printing to write once this error message happens very frequently while opengl3 is not finished removed dead code no longer needed after changes fixed comments that were misinformation window messages during window creation now handled these were previously discarded messages now tunnel the required context changed failure to create opengl3 window on windows to be more fatal marked a problem with pen code conditional compilation of vulkan and opengl3 on windows fixed windows debug builds now show messages on debug console also rendering driver selection box now shows only compiled drivers marked some problematic code thanks to akien-mga for patiently rewriting my style mistakes
* Add OS::is_process_running function.mdavisprog2022-05-031-0/+1
| | | | | | | | 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.
* Add GDNativeInterface::get_library_path to GDExtensionEmmanuel Leblond2022-04-291-1/+1
|
* Improve embedded PCK loading and exporting.bruvzg2022-04-201-0/+2
| | | | | | | | | | Windows export process: Limit size of executable with embedded PCK to 4 GB. Use "rcedit" before embedding PCK. Capture and process "rcedit" errors. Windows, Linux: Add support for PCK loading from executable "pck" section.
* Zero initialize all pointer class and struct membersRémi Verschelde2022-04-041-2/+2
| | | | | This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
* Add an `OS.get_processor_name()` methodHugo Locurcio2022-02-151-0/+1
| | | | | | | | This method can be used to get the CPU model name. It can be used in conjunction with `RenderingServer.get_video_adapter_name()` and `RenderingServer.get_video_adapter_vendor()` for annotating benchmarks and automatic graphics quality configuration.
* [OS/Crypto] Add get_entropy to OS.Fabio Alessandrelli2022-02-141-0/+2
| | | | | | | | | | | | | | | 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.
* Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker2022-02-121-2/+0
|
* Merge pull request #56012 from bruvzg/wt🤎4Rémi Verschelde2022-01-171-3/+2
|\
| * [Windows] Improve console handling and execute/create_process.bruvzg2021-12-181-3/+2
| | | | | | | | | | | | | | | | | | | | 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-031-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* [Windows] Detect new Windows Terminal and disable unsupported ↵bruvzg2021-12-151-0/+1
| | | | set_console_visible code.
* Add GLES2 2D renderer + Linux display managerlawnjelly2021-10-301-4/+0
| | | | | | | | | First implementation with Linux display manager. - Add single-threaded mode for EditorResourcePreview (needed for OpenGL). Co-authored-by: clayjohn <claynjohn@gmail.com> Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>