summaryrefslogtreecommitdiffstats
path: root/platform/uwp/os_uwp.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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!
* Fix UWP build.Fabio Alessandrelli2018-11-031-0/+1
| | | | | Add missing os_uwp.cpp include for VisualServerWrapMT. Add global env forced include to fix freetype in UWP.
* Fix init of VisualServerRasterRémi Verschelde2018-11-011-4/+2
| | | | | | | | Contrarily to what #23434 assumed, this is not a memory leak, the VisualServerRaster instance is passed as a parameter to VisualServerWrapMT's constructor. Fixes #23437.
* Fix initialization of visual server in all platformsGeorge Marques2018-11-011-4/+3
| | | | | Avoid leaking an extra instance when using threads. Also fix threaded loading issues on Android and iOS.
* Remove redundant "== true" codeAaron Franke2018-10-061-1/+1
| | | If it can be compared to a boolean, it can be evaluated as one in-place.
* Properly initialize Winsock on startupFabio Alessandrelli2018-09-131-0/+2
| | | | Also fix typo in _get_last_error which caused Winsock connect to fail.
* Unify StreamPeerTCP/TCP_Server with NetSocket APIFabio Alessandrelli2018-09-121-4/+0
|
* Unify PacketPeerUDP using NetSocketFabio Alessandrelli2018-09-121-2/+4
|
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-2/+2
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Fix typo in os_uwp causing a build failureHein-Pieter van Braam2018-08-281-1/+1
|
* Fall back to GLES2 if GLES3 is not workingHein-Pieter van Braam2018-08-261-18/+70
| | | | | | | | | | | | | | | | | | This adds a static is_viable() method to all rasterizers which has to be called before initializing the rasterizer. This allows us to check what rasterizer to use in OS::initialize together with the GL context initialization. This commit also adds a new project setting "rendering/quality/driver/driver_fallback" which allows the creator of a project to specify whether or not fallback to GLES2 is allowed. This setting is ignored for the editor so the editor will always open even if the project itself cannot run. This will hopefully reduce confusion for users downloading projects from the internet. We also no longer crash when GLES3 is not functioning on a platform. This fixes #15324
* Fix some more build issues after c69de2ba4Rémi Verschelde2018-07-201-0/+6
| | | | Fixes #20301.
* Style: Format code with clang-format 6.0.1Rémi Verschelde2018-07-181-1/+0
|
* Fix keep screen on property path for Android/iOS/UWPvolzhs2018-07-171-1/+1
|
* UWP: Add support for GLES2 driverGeorge Marques2018-07-121-24/+17
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Change OS::initialize signature to return Error (fix segfault on x11)Emmanuel Leblond2018-01-041-1/+3
|
* Merge pull request #12814 from guilhermefelipecgs/add_hardware_custom_cursorRémi Verschelde2018-01-031-0/+4
|\ | | | | Custom hardware-accelerated mouse cursor
| * Add implementation for custom hardware cursorGuilherme Silva2017-12-171-0/+4
| |
* | Merge pull request #15246 from vnen/uwp-gdnativeGeorge Marques2018-01-011-0/+45
|\ \ | | | | | | Make GDNative DLLs work on UWP
| * | Make GDNative DLLs work on UWPGeorge Marques2018-01-011-0/+45
| |/
* / Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Move windows networking class to drivers/windows/Fabio Alessandrelli2017-12-151-4/+4
| | | | | Also rename stream_peer_winsock.* to stream_peer_tcp_winsock.* and StreamPeerWinsock to StreamPeerTCPWinsock.
* Fixes vsync setting ignored when using a separate thread for renderingStefano Bonicatti2017-12-091-0/+1
| | | | | | | | | Setting the vsync in the main thread, after the rendering thread starts and takes the OpenGL context fails, so we need to do that before. Also, for some reason, the main thread cannot make current the context anymore. Fixes #13447
* Return and repair file loggingRuslan Mustakov2017-11-211-10/+3
| | | | And make it configurable, too.