summaryrefslogtreecommitdiffstats
path: root/platform/android/os_android.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-17/+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.
* Rename InputFilter back to InputRémi Verschelde2020-04-281-1/+1
| | | | | | | | | | | | | | | | It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690.
* Display Server supportPouleyKetchoupp2020-04-081-507/+45
|
* Vulkan rendering for AndroidPouleyKetchoupp2020-04-031-19/+58
|
* Replace NULL with nullptrlupoDharkael2020-04-021-5/+5
|
* Renaming of servers for coherency.Juan Linietsky2020-03-271-6/+6
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Refactored input, goes all via windows now.Juan Linietsky2020-03-261-3/+3
| | | | Also renamed Input to InputFilter because all it does is filter events.
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-1/+1
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Compilation fixes on AndroidPouleyKetchoupp2020-03-041-14/+22
|
* Remove incomplete battery status/power APIRémi Verschelde2020-02-141-2/+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-35/+8
| | | | | | | | | | | | | | 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!
* Fix double tap pressed event regressionAlexander Holland2020-01-291-2/+1
|
* Android virtual keyboard respecting LineEdit max length.Bruno Lourenço2020-01-231-2/+2
|
* Fixes Android FileDialogAlexander Holland2020-01-101-0/+20
| | | | | | - Go up was not working, simplify was used one time too much - Added GestureHandler - Added doubleTap to recognize open dir - Fixed scroll where sometimes the scroll jumped between start and end when pointer was outside or on the edge of the scroll area
* 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.
* Add Android NetSocket implementation.Fabio Alessandrelli2019-12-141-0/+3
| | | | Automatically acquire and release multicast lock when needed.
* iOS modular build and export implementation.bruvzg2019-12-011-5/+0
|
* Revert "Android : implement InputEventMagnifyGesture and InputEventPanGesture"Rémi Verschelde2019-11-111-33/+1
| | | | | | | | | | This reverts commit 9cc66495cfb6393102ce5ad4e82f2ccb716b9b33. This caused regressions with the handling of screen drag events. Fixes #33428. Fixes #33459. Fixes #33470.
* Android : implement InputEventMagnifyGesture and InputEventPanGestureJérémy Zurcher2019-11-021-1/+33
| | | | sets threshold constants PAN_GESTURE_MIN_DELTA and MAGNIFY_GESTURE_MIN_FACTOR
* Add request permission automatically at androidCagdas2019-10-221-0/+10
|
* Adds Pen support for AndroidAlexander Holland2019-10-041-0/+17
|
* Update the fallback input mapping for the Oculus mobile devices.fhuya2019-08-261-1/+1
|
* Support vibration for Android and iOSvolzhs2019-08-211-0/+4
|
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", ↵Robin Hübner2019-08-091-6/+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.
* Android: Include Joysticks/Gamepads which are available on app start.wombatstampede2019-05-281-0/+4
|
* added a const keyword for a methods that return constant literal...hbina0852019-05-211-1/+1
|
* Add Input::get_current_cursor_shapeGuilherme Felipe2019-04-151-8/+0
| | | | [Clean up] Removed unused/unnecessary methods.
* Restructuring glue code to make it easier to extendBastiaan Olij2019-04-051-83/+62
|
* Request Android record permission when neededDESKTOP-3H3MR3A\eloisa2019-03-081-1/+8
|
* Restart game on GL context loss on AndroidPedro J. Estébanez2019-03-061-14/+0
| | | | | | | Bonus: Remove useless old code about reload hooks Fixes #22955.
* Disable driver fallback to GLES2 by defaultRémi Verschelde2019-03-051-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Platform: Ensure classes match their header filenameRémi Verschelde2019-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | 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`
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Remove obsolete ANDROID_NATIVE_ACTIVITYBastiaan Olij2018-12-021-19/+0
|
* Fix init of VisualServerRasterRémi Verschelde2018-11-011-4/+1
| | | | | | | | 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/+5
| | | | | Avoid leaking an extra instance when using threads. Also fix threaded loading issues on Android and iOS.
* Repaired mistyped of 'its' on several files.M. Huri2018-10-251-1/+1
|
* Fix warnings in Android platformRémi Verschelde2018-10-031-2/+3
| | | | | | | | | | | | | | | | | | | | | Fixes the following Clang 7 warnings: ``` platform/android/os_android.h:240:16: warning: 'OS_Android::native_video_play' hides overloaded virtual function [-Woverloaded-virtual] platform/android/os_android.h:241:15: warning: 'OS_Android::native_video_is_playing' hides overloaded virtual function [-Woverloaded-virtual] platform/android/audio_driver_opensl.cpp:104:3: warning: suggest braces around initialization of subobject [-Wmissing-braces] platform/android/audio_driver_opensl.cpp:129:10: warning: unused variable 'numOutputs' [-Wunused-variable] platform/android/audio_driver_opensl.cpp:130:11: warning: unused variable 'deviceID' [-Wunused-variable] platform/android/java_glue.cpp:795:10: warning: unused variable 'clsio' [-Wunused-variable] platform/android/java_glue.cpp:890:12: warning: unused variable 'gob' [-Wunused-variable] platform/android/java_glue.cpp:592:13: warning: unused variable 'resized' [-Wunused-variable] platform/android/java_glue.cpp:593:13: warning: unused variable 'resized_reload' [-Wunused-variable] modules/mobile_vr/mobile_vr_interface.cpp:401:8: warning: unused variable 'aspect_ratio' [-Wunused-variable] drivers/unix/dir_access_unix.cpp:394:2: warning: THIS IS BROKEN [-W#warnings] ```
* Add clipboard operation for android OSXavier Sellier2018-09-051-5/+22
|
* Fall back to GLES2 if GLES3 is not workingHein-Pieter van Braam2018-08-261-14/+50
| | | | | | | | | | | | | | | | | | 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
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-2/+0
|
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Fix build issues and typos after c69de2ba4Rémi Verschelde2018-07-201-0/+1
|
* -Project/Editor settings now use new inspectorJuan Linietsky2018-07-191-0/+5
| | | | | | | -Project/Editor settings now show tooltips properly -Settings thar require restart now will show a restart warning -Video driver is now visible all the time, can be changed easily -Added function to request current video driver
* Implement OpenGL ES rasterizer selection logic for Android.geequlim2018-06-261-4/+13
|
* Implement universal translation of touch to mousePedro J. Estébanez2018-04-301-49/+0
| | | | | | | | | | | | | | | | | | | Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*) The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers. Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse. *: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest. On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction. Plus: Improve/fix tracking of current mouse position. ** Summary of changes to settings: ** - `display/window/handheld/emulate_touchscreen` becomes `input/pointing_devices/emulate_touch_from_mouse` - New setting: `input/pointing_devices/emulate_mouse_from_touch`
* Clean and expose get_audio/video_driver_* funcs on OS classMarcelo Fernandez2018-03-041-2/+2
|
* Fix open_dynamic_library for AndroidRuslan Mustakov2018-01-131-0/+11
|