summaryrefslogtreecommitdiffstats
path: root/platform/uwp/os_uwp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3Hugo Locurcio2021-10-301-4/+4
| | | | | - Use lowercase driver names for the `--rendering-driver` command line argument.
* Update Time documentationAaron Franke2021-10-281-4/+5
|
* Add missing WIN32_LEAN_AND_MEANBartłomiej T. Listwon2021-09-231-3/+1
|
* Use Key enum instead of plain integersAaron Franke2021-08-101-1/+1
|
* Use mouse and joypad enums instead of plain integersAaron Franke2021-06-201-3/+1
| | | | Also MIDIMessage
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-1/+1
|
* Add MOUSE_MODE_CONFINED_HIDDENAaron Franke2021-06-031-3/+1
| | | | Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
* Rename "Control" key to "Ctrl" and add "_pressed" suffix to all ↵Lightning_A2021-05-071-3/+3
| | | | InputEventWithModifiers properties/methods
* Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio2021-05-061-1/+1
|
* Converted sensor acceleration units to m/s^2 on iOS and UWPMarcus Brummer2021-03-171-3/+5
| | | | | | This is beacuse on Android these values are already in m/s^2 while on iOS and UWP they are in g. This just makes the behaviour consistent on all platforms.
* Make Servers truly Thread Safereduz2021-02-101-1/+0
| | | | | | | | | -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).
* Modernize ThreadPedro J. Estébanez2021-01-291-3/+0
| | | | | | | | | - 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)
* Modernize RWLockPedro J. Estébanez2021-01-191-2/+0
| | | | | | | | - 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`
* Split OS::execute into two methodsMarcel Admiraal2021-01-091-1/+5
| | | | | 1. execute(): Executes a command and returns the results. 2. create_process(): Creates a new process and returns the new process' id.
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | 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 🎆
* Remove OS::can_draw() remnantsMarcel Admiraal2020-12-171-4/+0
|
* Reorganize rendering server.reduz2020-12-031-2/+2
| | | | | -Made RenderingServerScene abstract, allowing reimplementation -RenderingServerRaster -> RenderingServerDefault, but this class is going away soon.
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-4/+4
|
* Remove obsolete GLES2 backend codeRémi Verschelde2020-08-131-1/+0
| | | | | | | | | | | This code currently isn't compiled (and cannot compile). We plan to re-add OpenGL ES-based renderer(s) in Godot 4.0 alongside Vulkan (probably ES 3.0, possibly also a low-end ES 2.0), but the code will be quite different so it's not relevant to keep this old Godot 3.2 code. The `drivers/gles2` code from the `3.2` branch can be used as a reference for a potential new implementation.
* Fix Return key events in LineEdit & TextEdit on AndroidPouleyKetchoupp2020-07-261-1/+1
| | | | | | | | | | | | | | | | | Depending on the device implementation, editor actions could be received with different action ids or not at all for multi-line. Added a parameter to virtual keyboards to properly handle single-line and multi-line cases in all situations. Single-line: Input type set to text without multiline to make sure actions are sent. IME options are set to DONE action to force action id consistency. Multi-line: Input type set to text and multiline to make sure enter triggers new lines. Actions are disabled by the multiline flag, so '\n' characters are handled in text changed callbacks.
* Merge pull request #38958 from lawnjelly/time_overflow_4Rémi Verschelde2020-06-111-2/+19
|\ | | | | Fix overflow condition with QueryPerformanceCounter
| * Fix overflow condition with QueryPerformanceCounterlawnjelly2020-05-221-2/+19
| | | | | | | | | | | | The previous code for OS_Windows::get_ticks_usec() multiplied the tick count by 1000000 before dividing by ticks_per_second. The ticks is counted in a 64 bit integer and is susceptible to overflow when a machine has been running for a long period of time (days) with a high frequency timer. This PR separates the overall calculation into one for seconds and one for the remainder, removing the possibility of overflow due to the multiplier.
* | Fix Android LineEdit editing bugsSkyJJ2020-05-161-1/+1
| |
* | Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* | Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-75/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* | Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-101-2/+4
| | | | | | | | | | | | | | Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
* | Replace NULL with nullptrlupoDharkael2020-04-021-8/+8
| |
* | Renaming of servers for coherency.Juan Linietsky2020-03-271-7/+7
|/ | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Drop old semaphore implementationPedro J. Estébanez2020-03-031-1/+0
| | | | | | | | | | | | - Removed platform-specific implementations. - Now all semaphores are in-object, unless they need to be conditionally created. - Similarly to `Mutex`, provided a dummy implementation for when `NO_THREADS` is defined. - Similarly to `Mutex`, methods are made `const` for easy use in such contexts. - Language bindings updated: `wait()` and `post()` are now `void`. - Language bindings updated: `try_wait()` added. Bonus: - Rewritten the `#ifdef` in `mutex.h` to meet the code style.
* Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodesRémi Verschelde2020-03-011-1/+2
|\ | | | | Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
| * Rename `scancode` to `keycode`.bruvzg2020-02-251-1/+2
| | | | | | | | | | Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap. Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
* | Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-261-1/+0
|/ | | | | | | | | | | | | | | | Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
* Remove incomplete battery status/power APIRémi Verschelde2020-02-141-14/+0
| | | | | | | | | | | It was initially implemented in #5871 for Godot 3.0, but never really completed or thoroughly tested for most platforms. It then stayed in limbo and nobody seems really keen to finish it, so it's better to remove it in 4.0, and re-add eventually (possibly with a different API) if there's demand and an implementation confirmed working on all platforms. Closes #8770.
* Remove obsolete GLES3 backendRémi Verschelde2020-02-131-54/+15
| | | | | | | | | | | | | | Due to the port to Vulkan and complete redesign of the rendering backend, the `drivers/gles3` code is no longer usable in this state and is not planned to be ported to the new architecture. The GLES2 backend is kept (while still disabled and non-working) as it will eventually be ported to serve as the low-end renderer for Godot 4.0. Some GLES3 features might be selectively ported to the updated GLES2 backend if there's a need for them, and extensions we can use for that. So long, OpenGL driver bugs!
* Android virtual keyboard respecting LineEdit max length.Bruno Lourenço2020-01-231-1/+1
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* iOS modular build and export implementation.bruvzg2019-12-011-5/+0
|
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", ↵Robin Hübner2019-08-091-7/+2
| | | | "modules/gdnative", "modules/gdscript" directories.
* Adding a new Camera Server implementation to Godot.BastiaanOlij2019-06-151-0/+6
| | | | | | This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server. Other parts of Godot can interact with this to obtain images from the camera as textures. This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
* added a const keyword for a methods that return constant literal...hbina0852019-05-211-1/+1
|
* Fix OS_UWP::execute's signature after cd4449eRémi Verschelde2019-05-161-1/+1
| | | | Same as #28919.
* Add Input::get_current_cursor_shapeGuilherme Felipe2019-04-151-0/+5
| | | | [Clean up] Removed unused/unnecessary methods.
* Disable driver fallback to GLES2 by defaultRémi Verschelde2019-03-051-2/+2
| | | | | | | | | | | | | | | | | | | GLES2 is not designed to be a drop-in replacement for the GLES3 backend, so the fallback mode has to be used knowingly. It *can* make sense for simple projects which make sure to handle the differences between both rendering backends, but most users should stick to one supported backend. By making it opt-in, we can now use this parameter to define whether to export ETC textures to Android and iOS when using GLES3 + Fallback. When using GLES3 without Fallback on Android, set the proper min GLES version in the AndroidManifest. Also made the option boolean and renamed it for clarity and to avoid conflict with the previous String option (which would always evaluate as "true" otherwise). Fixes #26569.
* -Remove harcoded opengl extension testing from OS, ask rasterizer instead.Juan Linietsky2019-02-261-1/+1
| | | | -Fixed a bug where etc textures were imported broken
* Merge pull request #25842 from marcelofg55/windows_timezoneRémi Verschelde2019-02-131-1/+3
|\ | | | | Fix get_time_zone_info returning inverted bias on Windows/UWP
| * Fix get_time_zone_info returning inverted bias on Windows/UWPMarcelo Fernandez2019-02-131-1/+3
| |
* | Platform: Ensure classes match their header filenameRémi Verschelde2019-02-121-85/+85
|/ | | | | | | | | | | | | | | | | | | | Also drop some unused files. Renamed: - `platform/iphone/sem_iphone.h` -> `semaphore_iphone.h` (same for `osx`) - `platform/uwp/gl_context_egl.h` -> `context_egl_uwp.h` - in `platform/windows`: `context_gl_win.h`, `crash_handler_win.h`, `godot_win.cpp`, `joypad.h` and `key_mapping_win.h` all renamed to use `windows`. Some classes renamed accordingly too. - `EditorExportAndroid` and `EditorExportUWP` renamed to `EditorExportPlatformAndroid` and `EditorExportPlatformUWP` - `power_android` and `power_osx` renamed to `PowerAndroid` and `PowerOSX` - `OSUWP` renamed to `OS_UWP` Dropped: - `platform/windows/ctxgl_procaddr.h`
* Added set_environment to OS classIgnacio Etcheverry2019-02-031-0/+5
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!