Fredia Huya-Kouadio
1f16ba2696
Add support for forwarding callbacks from Godot's parent activity.
2021-04-12 16:48:35 -07:00
Fredia Huya-Kouadio
b51dc2dc44
Fix custom boot splash image scaling.
2021-04-12 16:38:41 -07:00
Szymon Majewski
0a29322991
Validation layers on Android
2021-04-12 10:09:06 -07:00
Fredia Huya-Kouadio
a21457155b
Fix issue causing the response callback to be invoked with the invalid requestCode
and deprecate support for forwarding callbacks from Godot's parent activity.
2021-04-09 13:42:49 -07:00
Rémi Verschelde
d83761ba80
Style: Apply clang-tidy's readability-braces-around-statements
2021-04-05 14:09:59 +02:00
Rémi Verschelde
9bbe51dc27
Style: Apply clang-tidy's modernize-use-nullptr
2021-04-05 14:05:07 +02:00
Aaron Franke
a5324787c8
Rename some more global enums (Key, Joy, MIDI)
2021-03-23 07:13:23 -04:00
Aaron Franke
10d7fccb54
Rename ButtonList enum and members to MouseButton
2021-03-23 07:13:23 -04:00
Rémi Verschelde
fcddd8c53a
Merge pull request #46966 from qarmin/faster_release
...
Allow to not optimize release build
2021-03-20 22:44:47 +01:00
Bastiaan Olij
b3a43430aa
Fixes on android:
...
- creating Vulkan context instead of OpenGL
- checking for validity of ENV in wrapper classes
- fix for access to JavaVM from threads
2021-03-18 10:41:54 +11:00
Fredia Huya-Kouadio
8f285d93e8
Fix onMainRequestPermissionsResult callback for Android plugins.
2021-03-17 09:23:58 -07:00
Fredia Huya-Kouadio
4380004176
Enable doNotStrip
when doing development/debugging within Android Studio
2021-03-16 17:21:00 -07:00
Fredia Huya-Kouadio
2d574bcc85
Leverage java annotations to simplify the logic used to register the Godot plugin methods.
2021-03-16 01:16:08 -07:00
Rafał Mikrut
0b298d201e
Allow to not optimize release build
2021-03-14 15:51:05 +01:00
Rémi Verschelde
8051307efe
Merge pull request #46810 from W4RH4WK/file-access-get-buffer-parameter-checks
...
Add parameter checks to FileAccess get_buffer functions
2021-03-14 01:11:55 +01:00
Rémi Verschelde
7015027cbf
Merge pull request #46900 from Ev1lbl0w/bugfix-malloc_calls
...
Replace malloc's with Godot's memalloc macro
2021-03-13 21:55:52 +01:00
Ev1lbl0w
838e7d0a8d
Replace malloc's with Godot's memalloc macro
2021-03-13 11:51:45 +00:00
MrBrain295
b849873da5
Non functional to non-functional
2021-03-12 10:37:53 -06:00
Alex Hirsch
cdf3099c68
Add parameter checkes to FileAccess get_buffer functions
...
fix #46540
2021-03-09 13:55:20 +01:00
Rémi Verschelde
0e8fae1038
Merge pull request #46457 from m4gr3d/fix_invalid_missing_templates_error_master
...
Fix invalid missing template error when the Android build template is not installed
2021-02-27 16:52:25 +01:00
Fredia Huya-Kouadio
6f0ca6c9f7
Fix invalid missing template error when the Android build template is not installed.
2021-02-26 12:31:12 -08:00
Fredia Huya-Kouadio
6fd881e43c
Update the logic to load Godot Android plugins packaged into the binary.
...
The previous logic had the side effect of imposing a limit of one plugin per `aar` binary. The update lifts that restriction.
2021-02-26 08:38:39 -08:00
Fredia Huya-Kouadio
eda18fcc1f
Update the filtering logic to properly handle directories with .gdignore
files.
2021-02-24 18:40:36 -08:00
Rémi Verschelde
7f8bfd6ed1
Merge pull request #46381 from m4gr3d/update_godot_fragment_lifecycle_master
...
Update the initialization timeline for the Godot fragment
2021-02-24 16:14:16 +01:00
Fredia Huya-Kouadio
3ce7678374
Update the initialization timeline for the Godot fragment to be more consistent with the previous activity based timeline.
2021-02-24 06:16:07 -08:00
Fredia Huya-Kouadio
bc5120eb97
Add logic to record the version of the Godot engine for the Android platform.
2021-02-24 04:23:46 -08:00
Rémi Verschelde
310496a89f
Merge pull request #45617 from RandomShaper/modernize_atomics
...
Modernize atomics (and fix `volatile`)
2021-02-18 19:40:31 +01:00
Pedro J. Estébanez
8e128726f0
Modernize atomics
...
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile bool` by the new `SafeFlag`
- Platform-specific implementations no longer needed
Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 17:12:46 +01:00
reduz
64140eaf42
Reorganize Project Settings
...
-Advanced Settings toggle also hides advanced properties when disabled
-Simplified Advanced Bar (errors were just plain redundant)
-Reorganized rendering quality settings.
-Reorganized miscelaneous settings for clean up.
2021-02-18 11:23:34 -03:00
Fredia Huya-Kouadio
526b99ee36
Disable engine splash logic on Android; this is now handled by the Android theme api.
...
In addition, add support for scaling and applying filter to the splash screen on Android.
One limitation of the api being used is that the splash screen aspect ratio is not maintained when it's scaled up.
2021-02-18 03:20:49 -08:00
Fredia Huya-Kouadio
edeca16fb6
Override ANDROID_NDK_ROOT
based on the project ndk version.
...
This helps resolve issues where the project ndk version differs from the one pointed by the `ANDROID_NDK_ROOT` environment variable (if it exists).
2021-02-17 19:11:05 -08:00
Fredia Huya-Kouadio
9418197081
Add missing ndkVersion
to the library gradle build config.
2021-02-17 16:31:31 -08:00
Fredia Huya-Kouadio
e5311f3523
Revert AGP to version 4.0.1 as a workaround to https://issuetracker.google.com/issues/171235570 in version 4.1.x
2021-02-17 15:39:53 -08:00
Rémi Verschelde
c730da8b20
Android: Bump NDK version to 21.4.7075529
...
This is what GitHub Actions now provide and they removed the previous 21.3.6528147.
A bit annoying to have our hand forced this way but it's still 21.x so should be good
to upgrade.
2021-02-18 00:28:51 +01:00
Fredia Huya-Kouadio
9714abf8cb
Add verbose logging to help with troubleshooting the Android build/export process.
2021-02-17 13:18:41 -08:00
Fredia Huya-Kouadio
fe9f0758db
Expose GodotPlugin's utility methods used for registration and signal emitting.
...
This enables creation and use of a plugin like class by composition rather than inheritance.
2021-02-15 15:55:59 -08:00
Michael Conrad
cc2547a9e9
Fix joystick axis mapping issues with NVIDIA shield. Probably others.
...
Issues addressed:
a) Axis mappings were including virtual mouse axes on NVIDIA Shield TV.
The virtual mouse axes have the same axis numbers as the normal analog stick numbers. This was completely breaking joypad support on NVIDIA Shield TV.
b) Joypads were being tracked in a List with the index in the list being treated as the Godot device id.
If a device were to be removed, any device later in the list would be shifted, potentially causing future events with the shifted joypads to have incorrect IDs according to the Godot engine.
c) Unnecessary events were being sent to the Godot engine.
A check was added (per Joystick) that will prevent sending events for all axes when only a single axis value changed.
A similar check was added for "HATs".
See #45712
2021-02-09 08:37:22 -05:00
Rémi Verschelde
54857d7e81
Merge pull request #44949 from m4gr3d/specify_project_ndk_version
...
Improve the logic to compile for Android
2021-02-05 13:27:37 +01:00
Rémi Verschelde
74091a1974
Merge pull request #45579 from zaevi/add_scons_ext
...
add search extensions for Scons' path
2021-02-01 20:41:25 +01:00
zaevi
befbfecd4d
add search extensions for scons' path
2021-01-30 20:13:01 +08:00
Pedro J. Estébanez
99fe462452
Modernize Thread
...
- 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-29 12:02:13 +01:00
Sergey Minakov
7990c2c5e8
[Plugins] Rename 'PluginConfig' struct to platform specific name
2021-01-15 17:54:35 +03:00
Rémi Verschelde
af878716f2
CI: Update to clang-format 11 and apply ternary operator changes
2021-01-12 19:32:53 +01:00
Marcel Admiraal
2a74b388d0
Split OS::execute into two methods
...
1. execute(): Executes a command and returns the results.
2. create_process(): Creates a new process and returns the new process' id.
2021-01-09 10:03:23 +00:00
Fredia Huya-Kouadio
eee213e01a
Improve the logic to compile for Android by automatically detecting and setting up the Android NDK if needed.
2021-01-05 15:07:17 -08:00
Rémi Verschelde
3433780c49
Merge pull request #44645 from m4gr3d/update_apk_signing_logic
...
Update the logic to sign prebuilt Godot Android apks
2021-01-01 22:58:11 +01:00
Fredia Huya-Kouadio
49969de221
Update the logic to sign prebuilt Godot Android apks.
...
The previously used tool, `jarsigner` has been deprecated in favor of `apksigner` which is bundled with the Android SDK.
The logic is refactored accordingly and a few editor settings have been deprecated in the process as they're no longer necessary.
Note: As a side effect, specifying the Android SDK path is now required. The docs will be updated to reflect that change.
2021-01-01 13:36:27 -08:00
Rémi Verschelde
b5334d14f7
Update copyright statements to 2021
...
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 🎆
2021-01-01 20:19:21 +01:00
Rémi Verschelde
72c13c2631
Merge pull request #44638 from m4gr3d/export_format_util_method
...
Hardcode the export format for the editor 'run' feature
2020-12-30 09:11:31 +01:00
Fredia Huya-Kouadio
de64b783b4
Add utility method to export the project using a preset format and sign parameter.
2020-12-29 09:04:01 -08:00
Rémi Verschelde
e4c0572385
Merge pull request #44593 from madmiraal/rename-mainloop-methods
...
Rename MainLoop methods to match Node methods
2020-12-28 14:44:28 +01:00
Marcel Admiraal
5b937d493f
Rename empty() to is_empty()
2020-12-28 10:39:56 +00:00
Fredia Huya-Kouadio
2d492ff8ba
Fix invalid invocation of get_class_loader
.
...
The call was made on a `Godot` instance instead of an `Activity` instance.
2020-12-23 02:08:27 -08:00
Marcel Admiraal
d9e9eb8d04
Rename MainLoop methods to match Node methods
2020-12-22 12:34:57 +00:00
Rémi Verschelde
c7b53c03ae
SCons: Add explicit dependencies on thirdparty code in cloned env
...
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.
So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).
This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.
2020-12-18 10:29:34 +01:00
Marcel Admiraal
fa435a550a
Add override keywords to core/os.h derived classes.
2020-12-17 18:02:31 +00:00
Marcel Admiraal
8ef5e3201c
Don't handle BaseException in build scripts
2020-12-12 10:05:42 +00:00
Fabio Alessandrelli
09a9712a6a
Remove unused FileAccessJAndroid.
2020-12-09 10:58:36 +01:00
Rémi Verschelde
e5e1277ecd
Merge pull request #44161 from Faless/fix/fa_buffered_remove
...
Remove unused FileAccessBuffered
2020-12-09 09:14:14 +01:00
thebestnom
d543917c03
Android: fix mouse capture relative wrong
2020-12-08 23:51:45 +02:00
thebestnom
e7f259c366
Android: Allow Mouse Capture
2020-12-08 22:14:08 +02:00
Rémi Verschelde
90bdba576a
Merge pull request #43742 from qarmin/editor_modules_default_values
...
Initialize class/struct variables with default values in platform/ and editor/
2020-12-08 15:53:42 +01:00
Fabio Alessandrelli
781efc26e0
Remove now unused FileAccessBuffered.
2020-12-06 19:37:11 +01:00
reduz
2787ad65be
RenderingServer reorganization
2020-12-04 18:39:46 -03:00
alan-w-255
7fa803fa2c
fix android wrong multi-touch pointerid
...
Fixes #43519 .
2020-12-03 13:34:04 +01:00
Rafał Mikrut
e1811b689b
Initialize class/struct variables with default values in platform/ and editor/
2020-12-02 16:09:11 +01:00
bruvzg
99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
...
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
bruvzg
b9f441e81e
[Complex Text Layouts] Add third-party TextServer dependencies (ICU, HarfBuzz, Graphite).
2020-11-26 13:55:27 +02:00
Fredia Huya-Kouadio
918b218b55
Update gradle build files to automatically perform signing and zipalign tasks for custom builds.
2020-11-22 18:11:54 -08:00
Rémi Verschelde
504efc5f9b
Export: Reorder options for consistency across platforms
2020-11-20 11:17:50 +01:00
Fredia Huya-Kouadio
c4f2d87747
Fix zipalign command name on Windows machines.
2020-11-18 23:30:45 -08:00
Aaron Franke
02161aad5a
Remove empty lines around braces with the formatting script
2020-11-16 23:38:11 -05:00
Rémi Verschelde
484c3d5e27
Merge pull request #43248 from HEAVYPOLY/master
...
Change android orientations from sensor to user
2020-11-16 22:12:53 +01:00
Fredia Huya-Kouadio
46cc3233d8
Update the logic to query for the 'scons' command executable path.
2020-11-14 14:36:53 -08:00
Rémi Verschelde
9e7348f788
Merge pull request #43526 from m4gr3d/address_new_custom_build_logic_issues
...
Address new custom build logic issues
2020-11-14 22:58:16 +01:00
Fredia Huya-Kouadio
5f6a44f0bb
Add missing zip alignment step for generated apks.
2020-11-14 13:10:38 -08:00
Fredia Huya-Kouadio
3de720c11d
Fix issue causing Export all
to fail.
2020-11-14 13:10:38 -08:00
Fredia Huya-Kouadio
3c1a1a760e
Clear unneeded assets when generating an apk expansion.
...
Clean up export wording to account for the different export formats.
2020-11-14 13:07:32 -08:00
Marcus Brummer
e1b9be4a6b
Added the .jks file extension as valid preset for Android keystore files
2020-11-14 00:29:23 +01:00
Fredia Huya-Kouadio
597d9409f3
Remove duplicate Android orientation
settings.
2020-11-13 12:20:06 -08:00
reduz
127458ed17
Reorganized core/ directory, it was too fatty already
...
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Vaughan Ling
d658063833
Change android orientations from sensor to user
...
# Conflicts:
# platform/android/java/lib/src/org/godotengine/godot/GodotIO.java
2020-10-31 17:14:32 -07:00
Rémi Verschelde
41f66761fd
Merge pull request #37158 from thebestnom/android-click-support
...
Support mouse events on Android
2020-10-30 16:00:03 +01:00
Fredia Huya-Kouadio
edf762fba6
Add a separate nativeSrcsConfigs
module to handle Android Studio constraints for native code editor support.
2020-10-29 00:01:14 -07:00
Fredia Huya-Kouadio
aff7cf4390
Update the gradle plugins
2020-10-28 23:59:33 -07:00
Rémi Verschelde
2eaedcf14e
Merge pull request #42361 from akien-mga/vulkan-layers-opt-in
...
Vulkan: Make validation layers optional
2020-10-28 21:43:22 +01:00
Rémi Verschelde
45da7d579a
Merge pull request #43153 from nekomatata/android-build-version-close
...
Release .build_version file handle in Android custom build export
2020-10-28 10:03:18 +01:00
PouleyKetchoupp
b271315bac
Release .build_version file handle in Android custom build export
2020-10-28 09:07:20 +01:00
Mark Riedesel
96e22bd9fb
Implement OS.get_window_safe_area() for Android
2020-10-27 13:14:00 -04:00
Rémi Verschelde
54e6338c9b
Vulkan: Make validation layers optional
...
They're now disabled by default, and can be enabled with the command line
argument `--vk-layers`.
When enabled, the errors about them being missing are now warnings, as
users were confused and thought this meant Vulkan is broken for them.
Fix crash in `~VulkanContext` when validation layers are disabled (exposed by
this PR since before they could not be disabled without source modification).
Also moved VulkanContext member initializations to header.
Fixes #37102 .
2020-10-27 16:19:15 +01:00
Mark Riedesel
5fe902244a
Fix android apk contents having mtime 1 month in future
...
minizip documentation describes tm_mon as expecting the number of months
since January - [0, 11], but the month returned by OS.get_date() is in
the range of [1, 12].
2020-10-23 15:05:48 -04:00
thebestnom
42513f2f47
Android: Mouse Implementation
...
Implement mouse
Move touch to inputManager
Change to use android/input.h
2020-10-09 04:14:56 +03:00
Rémi Verschelde
4e19e3603b
Merge pull request #41385 from m4gr3d/fix_splash_loading_master
...
Fix splash screen loading on Android
2020-09-28 20:45:53 +02:00
Fredia Huya-Kouadio
79c1cf600b
Add overridable init method for the Godot fragment instance.
2020-09-18 16:59:09 -07:00
bruvzg
f043eabdd8
Adds PCK encryption support (using script encryption key for export).
...
Change default encryption mode from ECB to CFB.
2020-09-05 14:53:39 +03:00
bruvzg
80b8eff6aa
[Complex Test Layouts] Change String
to use UTF-32 encoding on all platforms.
2020-09-03 19:56:24 +03:00
Fredia Huya-Kouadio
b8d5ced8cd
Fix issue causing the textedit to move upward
2020-08-30 10:42:38 -07:00
Rémi Verschelde
c59e9399e7
Merge pull request #41550 from godotengine/revert-40671-virtual-keyboard-height-fix
...
Revert "Fix virtual keyboard height regression"
2020-08-27 08:55:51 +02:00
Rémi Verschelde
f98b32ff51
Merge pull request #41549 from godotengine/revert-40484-android-virtual-keyboard-adjustment
...
Revert "Disable virtual keyboard focus adjustment on Android"
2020-08-26 23:48:09 +02:00
Fredia Huya-Kouadio
db35a008f6
Revert "Fix virtual keyboard height regression"
2020-08-26 14:38:02 -07:00