summaryrefslogtreecommitdiff
path: root/platform/windows/os_windows.cpp
AgeCommit message (Collapse)Author
2022-05-16Replace most uses of Map by HashMapreduz
* 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!
2022-05-13Merge pull request #60894 from derammo/derammo_opengl3_windowsRémi Verschelde
2022-05-11opengl3 driver now works on windows including multi windowderammo
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
2022-05-10Try to convert OS::execute() output to Unicode on WindowsHaoyu Qiu
2022-05-03Add OS::is_process_running function.mdavisprog
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.
2022-04-29Add GDNativeInterface::get_library_path to GDExtensionEmmanuel Leblond
2022-04-20Improve embedded PCK loading and exporting.bruvzg
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.
2022-03-17Fix DST Error on Windowsztco224
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-15Add an `OS.get_processor_name()` methodHugo Locurcio
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.
2022-02-14[OS/Crypto] Add get_entropy to OS.Fabio Alessandrelli
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.
2022-01-28[Windows] Disable console I/O redirection, if it's already redirected to the ↵bruvzg
pipe or file.
2022-01-27Minor typo fixups to Windows console changesMax Hilbrunner
2022-01-17Merge pull request #56012 from bruvzg/wt🤎4Rémi Verschelde
2022-01-05Windows: Simplify QueryPerformanceCounter usageBartłomiej T. Listwon
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-18[Windows] Improve console handling and execute/create_process.bruvzg
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.
2021-12-15[Windows] Detect new Windows Terminal and disable unsupported ↵bruvzg
set_console_visible code.
2021-12-14[Windows] Open a new console window for the editor instances.bruvzg
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-11-25Restore console window output for editor app on WindowsYuri Roubinsky
2021-11-18Fix data directory of unnamed projectskobewi
2021-11-04Fix dwFlags on CreateProcessW callsWoLfulus
2021-10-28Update Time documentationAaron Franke
2021-10-09Implement get_cache_path() for iOS, and improve it for Android and WindowsPedro J. Estébanez
2021-10-05Merge pull request #52963 from Pineapple/WIN32_LEAN_AND_MEAN_masterRémi Verschelde
2021-10-04revert 0d7409a so additional error information prints in release buildsJordan Schidlowsky
2021-09-23Add missing WIN32_LEAN_AND_MEANBartłomiej T. Listwon
2021-09-19Fix shell_open not returning errors on WindowsRicardo Subtil
2021-08-16Add partial support for Android scoped storage.ne0fhyk
This is done by providing API access to app specific directories which don't have any limitations and allows us to bump the target sdk version to 30. In addition, we're also bumping the min sdk version to 19 as version 18 is no longer supported by Google Play Services and only account of 0.3% of Android devices.
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-22Move `alert` function from `DisplayServer` to `OS`.bruvzg
2021-07-04Replace backslash with forward slash in OS_Windows path methodsmiere43
2021-06-12Merge pull request #49123 from aaronfranke/it-is-timeRémi Verschelde
Add a Time singleton
2021-06-11Add Time singletonAaron Franke
2021-06-03Rename `String.is_abs_path()` to `String.is_absolute_path()`Hugo Locurcio
This is more consistent with `NodePath.is_absolute()`.
2021-05-21OS: Remove code duplicate in XDG paths handlingRémi Verschelde
Follow-up to #48542.
2021-05-20Only allow absolute paths in XDG environment variablesHugo Locurcio
The XDG Base Directory specification does not allow using relative paths (which broke things in Godot anyway). If a relative path is detected, it should be ignored.
2021-05-06Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-02-18Move tablet driver API from OS to DisplayServer.bruvzg
2021-02-10Make Servers truly Thread Safereduz
-Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread). -RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault. -Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory). -3D physics server changed to be made multithread friendly. -Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads. -Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
2021-01-29Modernize ThreadPedro J. Estébanez
- Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
2021-01-19Modernize RWLockPedro J. Estébanez
- Based on C++14's `shared_time_mutex` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed - Simpler for `NO_THREADS`
2021-01-09Split OS::execute into two methodsMarcel Admiraal
1. execute(): Executes a command and returns the results. 2. create_process(): Creates a new process and returns the new process' id.
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-22Rename MainLoop methods to match Node methodsMarcel Admiraal
2020-12-10Merge pull request #40708 from bruvzg/improve_os_localeRémi Verschelde
Improve `OS::get_locale()` and documentation.
2020-12-09Merge pull request #44161 from Faless/fix/fa_buffered_removeRémi Verschelde
Remove unused FileAccessBuffered
2020-12-08Merge pull request #43742 from qarmin/editor_modules_default_valuesRémi Verschelde
Initialize class/struct variables with default values in platform/ and editor/