summaryrefslogtreecommitdiffstats
path: root/drivers/windows
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-276-12/+12
|
* Rebrand preambles to RedotSpartan3222024-10-136-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | (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>
* [Windows] Use `GetFileTime` for `FileAccess`A Thousand Ships2024-09-171-7/+32
| | | | | | Prevents DST from rearranging file times. (cherry picked from commit 7139f46c9a1c84bdf530fa3fa4a632ce8025b6a9)
* Merge pull request #91100 from bruvzg/x_finksRémi Verschelde2024-04-292-3/+63
|\ | | | | | | Add symlink API support for Windows, expose symlink methods.
| * Add symlink API support for Windows, expose symlink methods.bruvzg2024-04-282-3/+63
| |
* | [Windows] Improve warning for path casing.A Thousand Ships2024-04-271-10/+55
|/
* [FileAccess] Implement `resize` method.bruvzg2024-04-123-0/+21
|
* Implement `OS.execute_with_pipe` method to run process with redirected stdio.bruvzg2024-03-272-0/+254
| | | | Implement `pipe://*` path handling for creation of named pipes.
* Pre-commit: Update to clang-format 17.0.6 and black 24.2.0Rémi Verschelde2024-02-281-1/+1
|
* Add const lvalue ref to core/* container parametersMuller-Castro2024-02-142-2/+2
|
* Fix invalid file path handling in Windows when there is dot in the file nameGNSS-Stylist2024-02-131-1/+6
| | | | This basically re-adds dot-removal removed by the previous commit.
* [Windows] Fix windows is_path_invalid, and apply it to directory creation.bruvzg2024-02-093-7/+11
|
* Use platform-specific methods for FileAccess reading and writingBlueCube33102023-10-292-0/+129
|
* Add method to check if filesystem is case sensitive.bruvzg2023-10-092-0/+49
|
* Windows: Remove `MSVC` define redundant with `_MSC_VER`Rémi Verschelde2023-09-261-0/+1
| | | | Cleanup unused MSVC code in FileAccessUnix.
* [Drivers,Platform] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-121-9/+9
|
* UWP: Remove platform port, needs to be redone from scratch for 4.xRémi Verschelde2023-09-071-23/+3
| | | | | | | | | | | The UWP platform port was never ported to the Godot 4.0+ API, and it's now accumulating bitrot as it doesn't compile, and thus we no longer propagate platform changes in it. So we finally remove to acknowledge this state. There's still some interest in reviving the UWP port eventually, especially as support for Direct3D 12 will soon be merged, but when that happens it will be easiest to redo it from scratch.
* Make Windows' safe save more resilientPedro J. Estébanez2023-08-251-22/+17
|
* [FileAccess] Add methods to get/set "hidden" and "read-only" attributes on ↵bruvzg2023-08-082-4/+57
| | | | macOS/BSD and Windows.
* Support long path in file access on windowsSamuele Panzeri2023-05-054-6/+21
| | | | Changed windows file access file to check for path length and use the \\?\ long format when needed
* Merge pull request #73156 from gw2cc/safe_saveYuri Sizov2023-03-161-4/+10
|\ | | | | Create a safe temporary file with is_backup_save_enabled
| * Create a safe temporary file with is_backup_save_enabledACB2023-03-151-4/+10
| |
* | Restore FileAccess.close method.bruvzg2023-02-162-0/+7
|/
* Prevent opening Windows console filesJuan Linietsky2023-01-112-1/+50
| | | | Fixes #20110.
* One Copyright Update to rule them allRémi Verschelde2023-01-054-116/+116
| | | | | | | | | | | | | | | | | | | | 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".
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-072-6/+6
| | | | change warnings=all to use /W4.
* Unix: Remove now unnecessary I/O defines, cleanupRémi Verschelde2022-10-031-27/+1
| | | | | | | | | | | | | | | | - `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.
* Fix DirAccessWindows::make_dir() choking on ".."nikitalita2022-09-261-1/+1
| | | | | | `CreateDirectoryW()` chokes on absolute paths that contain `..` example: "C:\\workspace\\..\\games\\assets" Simplifying the path before creating the dir fixes this.
* Replace File/Directory with FileAccess/DirAccesskobewi2022-09-192-2/+2
|
* Rename String `plus_file` to `path_join`Aaron Franke2022-08-291-6/+6
|
* Fix Windows list dir handle leakbitsawer2022-08-151-0/+2
|
* Add override keywords to DirAccess derived classesMarcel Admiraal2022-08-021-19/+19
|
* Add override keywords to FileAccess derived classesMarcel Admiraal2022-08-021-19/+19
|
* Remove or make private `FileAccess` `close()` methods.bruvzg2022-04-122-6/+6
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-112-2/+2
|
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-161-3/+4
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* [Windows] Add support for handling network share paths.bruvzg2022-01-241-2/+9
|
* Style: Remove inconsistently used `@author` docstringsRémi Verschelde2022-01-041-6/+2
| | | | | | | | | | Each file in Godot has had multiple contributors who co-authored it over the years, and the information of who was the original person to create that file is not very relevant, especially when used so inconsistently. `git blame` is a much better way to know who initially authored or later modified a given chunk of code, and most IDEs now have good integration to show this information.
* Update copyright statements to 2022Rémi Verschelde2022-01-034-8/+8
| | | | Happy new year to the wonderful Godot community!
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-092-5/+5
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Only print message for `get_modified_time()` failure when in verbose modeHugo Locurcio2021-12-011-1/+2
| | | | | | | | This error message was often displayed for no good reason when PCK files were loaded in the editor. Since file modification dates are secondary metadata, it's not very important if it can't be retrieved successfully anyway.
* Merge pull request #52963 from Pineapple/WIN32_LEAN_AND_MEAN_masterRémi Verschelde2021-10-052-0/+2
|\
| * Add missing WIN32_LEAN_AND_MEANBartłomiej T. Listwon2021-09-232-0/+2
| |
* | Merge pull request #43068 from cooperra/rename-fixRémi Verschelde2021-10-021-0/+5
|\ \ | |/ |/|
| * Fix file panel renaming unable to change the case of dirs on WindowsRobbie Cooper2020-10-251-0/+5
| | | | | | | | Tested on Windows 10.
* | Rename String::is_rel_path to String::is_relative_pathWilson E. Alvarez2021-08-291-5/+5
| |
* | FileAccessWindows: Add missing share.h includeRémi Verschelde2021-08-101-0/+1
| | | | | | | | Follow-up to #51430.
* | FileAccessWindows: Cosmetic improvementsMax Hilbrunner2021-08-091-4/+9
| |
* | Fix Windows platform file accessMax Hilbrunner2021-08-091-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restores Windows platform file handling back to open files non-exlusively by default, as was the case before October 2018. (See https://github.com/godotengine/godot/commit/b902a2f2a7438810cdcb053568ed5c27089b1e8a) Back then, while fixing warnings for MSVC, the function used for opening files was changed from _wfopen() to _wfopen_s() as suggsted by the warning C4996. ("This function may be unsafe, consider using _wfopen_s instead.") This new function 1. did parameter validation and thus avoided some possible security issues due to nil pointers or wrongly terminated strings 2. it also changed the default file sharing for opened files from _SH_DENYNO (which was the implicit default for the previous _wfopen()) to _SH_SECURE. _SH_DENYNO means every opened file could be opened by other calls (like is the default on other operating systems). _SH_SECURE means if the file is opened with READ access, others can still read the same file, but if it is opened with WRITE access, others can't open it at all, not even to read. This led to rarely occuring bugs on Windows, i.e. due to random access by Antivirus processes, or Godot/Windows not closing a file handle fast enough while trying to open it again elsewhere (i.e. project.godot, instead showing the Project manager, or saving shaders/debugging the game). What this PR does it change the file access to a third method, _wfsopen(). This is still secure, doing parameter validation and thus avoids the warning, but it allows us to actually SET the file sharing parameter. And we set it to _SH_DENYNO, as it was implicitely before the change. (And as it currently is on all non-Windows platforms, where file sharing restrictions don't exist by default.) Warning C4996 should really have been pointing this out. It should've been _wfsopen() all along. Let's hope this banishes those annoying, rare errors for all eternity. Fixes #28036.
* | Implement Resource UIDsreduz2021-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Most resource types now have unique identifiers. * Applies to text, binary and imported resources. * File formats reference both by text and UID (when available). UID always has priority. * Resource UIDs are 64 bits for better compatibility with the engine. * Can be represented and used textually, example `uuid://dapwmgsmnl28u`. * A special binary cache file is used and exported, containing the mappings. Example of how it looks: ```GDScript [gd_scene load_steps=2 format=3 uid="uid://dw86wq31afig2"] [ext_resource type="PackedScene" uid="uid://bt36ojelx8q6c" path="res://subscene.scn" id="1_t56hs"] ``` GDScript, shaders and other special resource files can't currently provide UIDs, but this should be doable with special keywords on the files. This will be reserved for future PRs.