Commit graph

891 commits

Author SHA1 Message Date
Cagdas ef5d1ebc95 Fix starting intent problem 2019-09-22 15:02:10 +03:00
Rémi Verschelde 2e065d8ad0
Merge pull request #32064 from m4gr3d/propagate_gl_surface_events
Notify for app pause and resume events on Android
2019-09-20 23:18:40 +02:00
Hugo Locurcio ba566dff2e
Distinguish editor-originating messages in the editor log
This fades out messages originating from the editor to make messages
printed by the project stand out more.

This also tweaks wording in some editor messages for consistency.
2019-09-20 01:59:02 +02:00
fhuya a7712cc9e4 Add new events and accompanying logic to notify when the app is paused and resumed on Android devices. 2019-09-19 13:29:49 -07:00
fhuya 7fabfd402f Split the Android platform java logic into an Android library module (lib) and an application module (app).
The application module `app` serves double duties of providing the prebuilt Godot binaries ('android_debug.apk', 'android_release.apk') and the Godot custom build template ('android_source.zip').
2019-09-04 16:20:22 -07:00
Rémi Verschelde b1f294b3ac Android: Improve dialogs about custom build template
The language didn't make it clear that it's installing a *source* template
to the project folder, for later use when compiling custom APKs.

Fixes #28736.
2019-08-29 13:22:20 +02:00
Rémi Verschelde b948b38840 SCons: Generate android_source.zip during build
This is now needed after #27781, as this android_source.zip template
is used for custom Android builds from the editor.
2019-08-29 13:22:17 +02:00
Rémi Verschelde f38c64e8b1
Merge pull request #31709 from akien-mga/android-fix-thirdparty
Android: Fix another regression with Secure.ANDROID_ID, and fix formatting and documentation of thirdparty code
2019-08-27 20:16:08 +02:00
Rémi Verschelde b7c46ed929
Merge pull request #31713 from volzhs/fix-vibrate
Suppress MissingPermission warning for Android vibration
2019-08-27 17:42:32 +02:00
Rémi Verschelde eb8d181cb2 Android: Sync Google billing library with upstream, unmodified
Synced with 7a94c6905a.
2019-08-27 15:15:37 +02:00
volzhs 8cda898fbb Suppress MissingPermission warning for Android vibration
It does check its permission every `vibrate_handheld()` calls.
Vibrate permission is added by checking it on export settings.

And there are some changes for deprecated method.
2019-08-27 22:01:45 +09:00
Rémi Verschelde 472d10a0ad Android: Reapply custom changes to Google expansion.downloader lib
I don't know why they're needed, but readding for now to keep things
working as they were.
2019-08-27 14:30:14 +02:00
Rémi Verschelde ee5898f58a Android: Resync Google expansion.downloader library with upstream, unmodified
Synced with 9ecf54e5ce.
2019-08-27 14:10:31 +02:00
Rémi Verschelde ce60217894 Android: Reapply changes to Google licensing lib from #24145
But document them better this time.
2019-08-27 14:10:30 +02:00
Rémi Verschelde 6f0367052a Android: Resync Google licensing lib with upstream, unmodified
It had been synced with style changes (spaces -> tabs), not sure why
I accepted to merge it this way back then...

Synced with eb57657f66,
same as before.

Custom-changes will be reapplied in the next commit, if relevant.
2019-08-27 13:44:16 +02:00
Rémi Verschelde 071ebb1e48 Android: Fix another regression with Secure.ANDROID_ID
Regression from #24145, which was missed in #28146.
2019-08-27 13:44:07 +02:00
Rémi Verschelde 04ac6a43a4 Android: Style fixes to manifest and build.gradle 2019-08-27 11:16:55 +02:00
Rémi Verschelde 1afd77e375 Android: Bump gradle version to 5.1.1
Matching changes made in #31521 and #31547 but only in the Jetbrains
IDE config.
2019-08-27 10:22:05 +02:00
fhuya 5eaaabceaf Update the fallback input mapping for the Oculus mobile devices. 2019-08-26 18:48:54 -07:00
Rémi Verschelde 1a4dbd9ee2
Merge pull request #31437 from volzhs/vibrate-mobile
Support vibration for Android and iOS
2019-08-21 21:10:22 +02:00
volzhs 4061e5bb75 Support vibration for Android and iOS 2019-08-21 23:38:53 +09:00
fhuya f35b1f3b91 Shut down Godot processes on app exit. 2019-08-20 22:35:46 -07:00
Rémi Verschelde 6c607c3564
Merge pull request #31266 from IAmActuallyCthulhu/pr/remove-redundant-author-comments
Remove redundant author doc comments
2019-08-14 13:45:54 +02:00
Rémi Verschelde 37a16fee05 Export: Remove temp files from cache after export
So far we left most temporary files lying around, so this attempts to
fix that.

I added a helper method to DirAccess to factor out the boilerplate of
creating a DirAccess, checking if the file exists, remove it or print
an error on failure.
2019-08-12 13:31:59 +02:00
IAmActuallyCthulhu 82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
Robin Hübner 6ab118c464 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories. 2019-08-09 11:13:24 +02:00
Cameron Reikes 62ed44d75f Add feature tag for hmd devices based on DOF
- Necessary according to https://developers.google.com/vr/develop/android/3dof-to-6dof
2019-08-07 16:41:49 -07:00
Rémi Verschelde af935af38d
Merge pull request #30468 from SaracenOne/expose_audio_capture
Exposes capture methods to AudioServer + documentation
2019-08-07 13:27:25 +02:00
Rémi Verschelde 2da1614beb Android: Remove unusable android_stl=no option
As of 3.1 and later, we have too many thirdparty C++ dependencies
and some internal uses of `new` and `delete` too for it to make
sense to build without the STL on Android.

The option has been broken since 3.0, and the "System STL" that we
relied on for basic support of `new` and `delete` is likely to be
dropped from the NDK:
https://android.googlesource.com/platform/ndk/+/ndk-release-r20/docs/BuildSystemMaintainers.md#System-STL
2019-07-30 18:53:38 +02:00
Rémi Verschelde d6ef5daf48 Android: Drop support for NDK < r15
NDK r15c was released over two years ago (July 2017), and we
cannot build against r14b anyway as it seems to fail with our
setup to link the STL.
2019-07-30 15:49:31 +02:00
unknown b0e44c9e5d Removed an unused commit 2019-07-20 14:40:09 +05:30
Saracen c81ec6f26d Exposes capture methods to AudioServer, variable renames for consistency,
added documentation.
2019-07-15 15:12:29 +01:00
Rémi Verschelde af80182016
Merge pull request #30407 from qarmin/small_fixess
Fixes minor issues found by static analyzer
2019-07-08 08:16:50 +02:00
qarmin 9a77d748c0 Fixes minor issues found by static analyzer 2019-07-07 23:08:51 +02:00
Ibrahn Sahir 4e4697b1c4 Added release function to PoolVector::Access.
For clarity, assign-to-release idiom for PoolVector::Read/Write
replaced with a function call.
Existing uses replaced (or removed if already handled by scope)
2019-07-06 12:04:27 +01:00
Rémi Verschelde b0d41847ed SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
It's the recommended way to set those, and is more portable
(automatically prepends -D for GCC/Clang and /D for MSVC).

We still use CPPFLAGS for some pre-processor flags which are not
defines.
2019-07-03 09:59:04 +02:00
fhuya dea414abc8 Make the meta-data name attribute settable. This will facilitate reuse for ARCore integration. 2019-07-02 11:21:26 -07:00
Rémi Verschelde d2c416ec62
Merge pull request #29824 from m4gr3d/add_ovr_export
Add XR mode selection to the Android export process.
2019-07-02 10:36:30 +02:00
fhuya 12e0dc1b65 Add XR mode selection to the Android export process. 2019-07-02 00:12:38 -07:00
Rémi Verschelde d17eac735c
Merge pull request #29815 from NilsIrl/plus_file_1
Replace ` + "/" + ` with `String::file_add()`
2019-07-01 12:06:35 +02:00
Nils ANDRÉ-CHANG d2833d4f4d Replace + "/" + with String::file_add() 2019-06-23 13:33:50 +01:00
lawnjelly 512f8ebb93 Fix some keyboards not working with Android
Fixes #17004

Currently the keydown and keyup messages are handled with method like this:

if ((source & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK
|| (source & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD
|| (source & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) {
// joystick input
}
else
{
// keyboard input
}

The constant for SOURCE_DPAD is 513
10 0000 0001

and the constant for SOURCE_KEYBOARD is 257
1 0000 0001

However, rather confusingly, for many keyboards the source sent by android is 769
11 0000 0001

Thus the keyboard is passing the check as being a DPAD and being processed as a joystick rather than keyboard. This PR handles the specific case of 769, allowing input from physical keyboards.
2019-06-21 12:57:33 +01:00
Rémi Verschelde d61bce1b75
Merge pull request #29910 from m4gr3d/dev_deprecate_armv6
Deprecate support for Android armv6 architecture
2019-06-20 10:22:23 +02:00
fhuya f7200d6960 Deprecate armv6 support for Android 2019-06-19 12:05:58 -07:00
JohnJLight 38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Rémi Verschelde f6f9f89078
Merge pull request #29325 from m4gr3d/setup_godot_for_ovr_support
Setup Godot to support the Oculus Mobile SDK.
2019-06-16 10:37:57 +02:00
BastiaanOlij 02ea99129e Adding a new Camera Server implementation to Godot.
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.
2019-06-15 21:30:32 +10:00
Rémi Verschelde 6d16f2f053 Fix error macro calls not ending with semicolon
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
2019-06-11 14:49:34 +02:00
fhuya 2c3536810a Setup Godot to support the Oculus Mobile SDK. 2019-05-30 16:35:50 -07:00
wombatstampede 6e46701e64 Android: Include Joysticks/Gamepads which are available on app start. 2019-05-28 18:23:30 +02:00
Rémi Verschelde 900d90bb61 Git: Explicitly list binary files as such to avoid EOL change
text=auto works well in Git 2.10+ but it's broken in previous versions,
which are still used in production on e.g. Ubuntu 16.04 LTS.

Also fix a couple missed text files with CRLF terminators.
.bat files likely require it to be processed properly on Windows,
but core.autocrlf should take care of converting them on the fly
when checking out on Windows.
2019-05-25 10:43:48 +02:00
Rémi Verschelde c29ef774d8
Merge pull request #29032 from akien-mga/tools-exceptions-rtti
SCons: Keep exceptions and rtti on Android, iOS and HTML5 tools build
2019-05-21 17:10:51 +02:00
hbina085 f78baa5f93 added a const keyword for a methods that return constant literal... 2019-05-21 02:16:30 -04:00
Rémi Verschelde 4b20959d99 SCons: Keep exceptions and rtti on Android, iOS and HTML5 tools build
Those were disable to keep size small, and on Android avoid the dependency on the STL,
but for tools build (editor) this is not really a concern.

Note: as of today it's not possible to build tools=yes for those platforms, but this
change is one of the necessary steps to enable it.

Fixes #25262.
2019-05-20 16:51:20 +02:00
Rémi Verschelde e0574e1d98 Fix typos with codespell
Using codespell 1.15.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-05-19 13:10:35 +02:00
George Marques c121d8871d
Allow project export to be canceled 2019-05-18 15:33:57 -03:00
Rémi Verschelde e0517a12c5
Merge pull request #28518 from clayjohn/GLES2-MSAA
Added MSAA to GLES2 backend
2019-05-13 17:46:11 +02:00
Aaron Franke 702b539405
Change "ID" to lowercase "id"
Reasoning: ID is not an acronym, it is simply short for identification, so it logically should not be capitalized. But even if it was an acronym, other acronyms in Godot are not capitalized, like p_rid, p_ip, and p_json.
2019-05-09 06:25:32 -04:00
clayjohn a3d5aec68d added MSAA to GLES backend 2019-05-02 14:24:20 -07:00
Rémi Verschelde ae41e35191
Merge pull request #27676 from qarmin/small_fixes_2
Small fixes to static analyzer bugs
2019-05-01 08:19:04 +02:00
Rémi Verschelde d52b70fb5e SCons: Always use env.Prepend for CPPPATH
Include paths are processed from left to right, so we use Prepend to
ensure that paths to bundled thirdparty files will have precedence over
system paths (e.g. `/usr/include` should have lowest priority).
2019-04-30 13:12:06 +02:00
Juan Linietsky af9bb0ea15 Clean up latency related functions 2019-04-27 12:23:05 -03:00
Rémi Verschelde 24005bc03d
Merge pull request #28396 from akien-mga/scons-capture-the-flags
SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGS
2019-04-25 12:22:22 +02:00
Juan Linietsky cf5881f574 Rename wrong field. 2019-04-24 17:01:20 -03:00
Juan Linietsky a424d39f76 Remove forgotten strings in configuration files 2019-04-24 16:31:23 -03:00
Rémi Verschelde c2a669a9f0 SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGS
Many contributors (me included) did not fully understand what CCFLAGS,
CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them
in the way they are intended to be.

As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html

- CCFLAGS: General options that are passed to the C and C++ compilers.
- CFLAGS: General options that are passed to the C compiler (C only;
  not C++).
- CXXFLAGS: General options that are passed to the C++ compiler. By
  default, this includes the value of $CCFLAGS, so that setting
  $CCFLAGS affects both C and C++ compilation.
- CPPFLAGS: User-specified C preprocessor options. These will be
  included in any command that uses the C preprocessor, including not
  just compilation of C and C++ source files [...], but also [...]
  Fortran [...] and [...] assembly language source file[s].

TL;DR: Compiler options go to CCFLAGS, unless they must be restricted
to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to
CPPFLAGS.
2019-04-24 16:57:58 +02:00
Juan Linietsky dd03dcbd5a Android now (optionally) builds the template when exporting
Added new way to create add-ons
Removed old way to create add-ons
2019-04-07 15:46:52 -03:00
Juan Linietsky cd4449e7ab Add FileAccess::set_unix_permissions for Unix platforms 2019-04-07 15:45:30 -03:00
Rémi Verschelde a342131eba
Merge pull request #27673 from qarmin/small_fixes
Small fixes, mostly duplicated code
2019-04-22 12:00:34 +02:00
Rémi Verschelde f20c9c25eb
Merge pull request #28164 from BastiaanOlij/AndroidCameraPermission
Add camera permissions to android
2019-04-19 11:27:11 +02:00
Bastiaan Olij fab84c7dff Add camera permissions to android 2019-04-18 23:16:41 +10:00
Rémi Verschelde 2dee231c8e
Merge pull request #28146 from volzhs/unique_id_android
Fix get_unique_id() on Android
2019-04-18 13:53:27 +02:00
volzhs 5a4b2087a0 Fix get_unique_id() on Android 2019-04-18 08:07:03 +09:00
Guilherme Felipe 1bae73d7d0 Add Input::get_current_cursor_shape
[Clean up] Removed unused/unnecessary methods.
2019-04-15 15:22:09 -03:00
Rémi Verschelde c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
qarmin 856a8226a5 Small fixes, mostly dupicated code 2019-04-08 11:03:37 +02:00
Hendrikto 49a81308c0 Remove unused imports 2019-04-06 18:05:05 +02:00
Rémi Verschelde d450220bae Use mix rate and output latency constants in audio drivers
Fix default mix rate in Xaudio2 and potential shadowing issue in JAndroid.
2019-04-06 12:37:25 +02:00
Bastiaan Olij b2c0a687f1 Restructuring glue code to make it easier to extend 2019-04-05 21:44:06 +11:00
qarmin 8460d0678c Small fixes to static analyzer bugs 2019-04-04 22:00:16 +02:00
marxin e7f22ebdcd Enable warnings=extra on clang and GCC testers.
And remove 2 warnings from warnings=extra.
2019-04-02 17:14:47 +02:00
DESKTOP-3H3MR3A\eloisa b22cf46fdb Request Android record permission when needed 2019-03-08 12:38:36 -03:00
Rémi Verschelde c74bf2e6b1 Define android/modules globally so it appears in Project Settings
Until now people had to add it manually to project.godot to load custom modules.
2019-03-07 11:25:58 +01:00
Pedro J. Estébanez 2d0d64794e Restart game on GL context loss on Android
Bonus:
Remove useless old code about reload hooks

Fixes #22955.
2019-03-06 19:09:17 +01:00
volzhs 8920bb8c1b Fix directory check when exporting project
Fix #26702
2019-03-06 21:20:18 +09:00
Rémi Verschelde b4d5c1ab5b
Merge pull request #26633 from akien-mga/driver-fallback-etc
Disable driver fallback to GLES2 by default
2019-03-06 00:57:49 +01:00
Ricardo Lüders 3fdbdd8380 Fixes misleading error message when trying to export
This patch fixes the misleading error message when users
try to "export all" into an invalid destination path.

Closes #26539
2019-03-05 21:32:52 +01:00
Rémi Verschelde b0f782a0e3 Disable driver fallback to GLES2 by default
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.
2019-03-05 16:36:46 +01:00
Rémi Verschelde 9d002442b2 Improve VRAM texture compression checks for mobile/web
For HTML5, we need to support S3TC if running on desktop,
and ETC or ETC2 for mobile, so make this explicit.

Add logic to check for ETC2 support on GLES3,
and remove incorrect ETC feature for GLES3 on Android.

Fix ETC check invalidating templates on HTML5.
Fixes #26476.
2019-03-03 13:24:08 +01:00
Rémi Verschelde 1807e0f135 SCons: Move platform-specific Opus config to its module 2019-03-02 10:30:25 +01:00
Rémi Verschelde 351a2fa41c
Merge pull request #26353 from ivanarh/android_hide_keyboard_crash
Android: Fixed a possible crash in keyboard hide method.
2019-03-01 20:19:48 +01:00
Marcelo Fernandez 29fb6b4e15 Implement Audio Input support on Android 2019-02-28 14:33:43 -03:00
Ivan Ponomarev 288ff2fd08 Android: Fixed a possible crash in keyboard hide method. It's called not from main thread so InputMethodManager can't be used directly. 2019-02-27 16:59:50 +03:00
Ivan Ponomarev 1073f0b423 Android: Fixed problems with memory leaks due to absent ReleaseStringUTFChars calls. 2019-02-27 15:11:08 +03:00
Juan Linietsky f669ebeeaf -Properly handle missing ETC support on export
-Added ability for resource importers to save metadata
-Added ability for resource importers to validate depending on project settings
2019-02-26 18:45:06 -03:00
Juan Linietsky 5eeb06ffd1 -Remove harcoded opengl extension testing from OS, ask rasterizer instead.
-Fixed a bug where etc textures were imported broken
2019-02-26 11:58:47 -03:00
marxin 8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Rémi Verschelde bc26d0d6cd Platform: Ensure classes match their header filename
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`
2019-02-12 16:56:25 +01:00
Rémi Verschelde c3b0ee5941 Fix code style issues 2019-01-26 22:35:31 +01:00
Ignacio Etcheverry 6de04cf04c Improve custom thread numbering for POSIX
We lazily assign new IDs to threads that do not have one. This is the case for threads not created by the Godot API.
2019-01-25 00:59:07 +01:00
Juan Linietsky 6fa632b821 Add function to obtain filesystem type from DirAccess.
Change EditorFileSystem to not use directory modification times on FAT32, fixes #20946
2019-01-21 18:06:14 -03:00
Rémi Verschelde 2323464f5e ExportDialog: Make error messages translatable
Also fix missing newlines that caused #24202.
2019-01-21 18:34:53 +01:00
Rémi Verschelde 9e820cdf20 Android: Enable arm64-v8a export by default
From August 1, 2019, Google Play requires that all new apps and app updates
include 64-bit versions, so we enable ARM64 by default.

IINM support for x86 and x86_64 is still be optional, so not enabling them
out of the box.

Part of #25030.
2019-01-16 13:54:51 +01:00
Rémi Verschelde eebca76be5 SCons: Drop unused MPC_FIXED_POINT define 2019-01-16 12:27:57 +01:00
Rémi Verschelde 7f4ee36469 Android: Add support for x86_64 architecture
Like arm64v8, this is only supported by API 21 and later,
so we enforce 21 as min API for x86_64.

Part of #25030.
2019-01-16 11:39:39 +01:00
volzhs 87db1a8971 Fix Android keep screen on working properly 2019-01-15 22:06:44 +09:00
Hein-Pieter van Braam e5b335d367 Don't use -ffast-math or other unsafe math optimizations
Godot supports many different compilers and for production releases we
have to support 3 currently: GCC8, Clang6, and MSVC2017. These compilers
all do slightly different things with -ffast-math and it is causing
issues now. See #24841, #24540, #10758, #10070. And probably other
complaints about physics differences between release and release_debug
builds.

I've done some performance comparisons on Linux x86_64. All tests are
ran 20 times.

Bunnymark: (higher is better)
(bunnies)    min    max  stdev average
fast-math   7332   7597    71     7432
this pr     7379   7779   108     7621 (102%)

FPBench (gdscript port http://fpbench.org/) (lower is better)
(ms)
fast-math  15441  16127   192    15764
this pr    15671  16855   326    16001  (99%)

Float_add (adding floats in a tight loop) (lower is better)
(sec)
fast-math   5.49   5.78  0.07     5.65
this pr     5.65   5.90  0.06     5.76  (98%)

Float_div (dividing floats in a tight loop) (lower is better)
(sec)
fast-math  11.70  12.36  0.18    11.99
this pr    11.92  12.32  0.12    12.12  (99%)

Float_mul (multiplying floats in a tight loop) (lower is better)
(sec)
fast-math  11.72  12.17  0.12    11.93
this pr    12.01  12.62  0.17    12.26  (97%)

I have also looked at FPS numbers for tps-demo, 3d platformer, 2d
platformer, and sponza and could not find any measurable difference.

I believe that given the issues and oft-reported (physics) glitches on
release builds I believe that the couple of percent of tight-loop
floating point performance regression is well worth it.

This fixes #24540 and fixes #24841
2019-01-09 02:06:13 +01:00
Rémi Verschelde bd6ab5360f
Merge pull request #24592 from volzhs/android-etc
Make possible to use ETC texture format with GLES3 on Android
2019-01-04 16:49:49 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
volzhs 130cdb2f2a Make possible to use ETC texture format with GLES3 on Android
Currently, textures are not exported if use ETC on project settings and export project with GLES3.
GLES3 should be able to use ETC format also.
2018-12-26 00:47:06 +09:00
Rémi Verschelde 6770357e47 Android: Better identify thirdparty C/C++ code
- The `cpu-features.{c,h}` code was only used by chance by the webm
  (libvpx) code, so I moved it there. It was actually introduced before
  that and wasn't in use, and libvpx just happened to be able to
  compile thanks to it being bundled.
  It could potentially be compiled on the fly from the Android NDK, but
  since we plan to replace the webm module by a GDNative plugin in the
  near future, I went the bundling route.

- `ifaddrs_android.h` is already provided in the Android NDK as
  `ifaddrs.h`, same as on other Unixes. Yet we cannot use it until we
  up the min API level to 24, where `getifaddrs` is first defined.
  I moved the files to `thirdparty/misc` and synced them with upstream
  WebRTC (only indentation changes and removal of `static` qualifiers).

Also removes dropped thirdparty files from COPYRIGHT.txt after changes
in #24105 and #24145.
2018-12-20 13:07:54 +01:00
Rémi Verschelde 9cb18232c2 Core: Drop unused global_defaults logic
It used to be used for Android and iOS to specify platform-specific
project settings overrides, but we now have feature tags for that.
2018-12-20 11:02:49 +01:00
George Marques e3e5a1bb6e Add option to add debug keystore in Android export 2018-12-19 15:09:09 -02:00
volzhs b385a4b053 Fix lint error/warning while building android template 2018-12-18 17:26:33 +09:00
Rémi Verschelde 16fda586d9 Android: Don't expose x86_64 ABI for export if we can't build templates for it
Support for x86_64 *could* be added in detect.py, but AFAIK this is not
a widespread architecture for Android, much less for gaming devices.
2018-12-14 23:08:00 +01:00
Rémi Verschelde d8a28368f9
Merge pull request #24105 from BastiaanOlij/cleanup_old_android_native
Remove obsolete ANDROID_NATIVE_ACTIVITY
2018-12-02 21:15:54 +01:00
Bastiaan Olij 6105a8beb1 Remove obsolete ANDROID_NATIVE_ACTIVITY 2018-12-02 00:48:37 +11:00
George Marques 22233ded4a Change custom permissions in Android export to an array
Don't limit the amount of permissions and makes it simpler to
understand.
2018-11-30 11:13:50 -02:00
Hugo Locurcio 8c7087ff7f
Remove an unused script
[ci skip]
2018-11-24 16:33:31 +01:00
Simon Sikström 00b57d3bd2 Adding support for java.lang.Long values in Android GodotLib.calldeferred calls 2018-11-20 14:46:08 +01:00
Rémi Verschelde 173b342ca7 Remove trailing whitespace
With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'`
(+ manual revert of some thirdparty code under `platform/android`).
2018-11-20 11:15:02 +01:00
Rémi Verschelde 5beaea9891
Merge pull request #23389 from marcelofg55/multiple_ext
Export for OS X on OS X now lets you select .dmg or .zip
2018-11-02 11:07:18 +01:00
Rémi Verschelde 8ac1bcfd3d Fix init of VisualServerRaster
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.
2018-11-01 19:23:12 +01:00
George Marques 4c9d734a75 Fix initialization of visual server in all platforms
Avoid leaking an extra instance when using threads. Also fix threaded
loading issues on Android and iOS.
2018-11-01 10:27:04 -03:00
Marcelo Fernandez d51999f11d Export for OS X on OS X now lets you select .dmg or .zip 2018-11-01 10:08:26 -03:00
Rémi Verschelde fbc0e5d98d
Merge pull request #23320 from lethiandev/android-invalid-package-name-error
Add android export error on invalid package name
2018-11-01 10:18:04 +01:00
Rémi Verschelde bfd1f09ac5 Style: Apply clang-format to wrongly formatted files 2018-10-29 23:47:40 +01:00
Xavier Sellier 7dcf779a8b
Prevent a device to be added/deleted more than once on Android
cherry-picked from fb5a601217
2018-10-29 13:04:36 -03:00
Konrad Nowakowski 2255d4fdfd Add android export error on invalid package name 2018-10-29 14:26:53 +00:00
Rémi Verschelde 8650793eac
Merge pull request #23317 from lupoDharkael/py-none
Dont use equality operators with None singleton in python files
2018-10-29 12:11:24 +01:00
Karen Schwane a01ce6299c Move jcenter behind mavenCentral and google gradle repos to fix build problems 2018-10-28 19:20:30 +01:00
lupoDharkael edcca5f7ad Dont use equality operators with None singleton in python files 2018-10-27 01:18:15 +02:00
M. Huri b46ba24e3b Repaired mistyped of 'its' on several files. 2018-10-25 07:19:21 +07:00
dumitru-stama 4c9eb86cbf Fixed initialization of android modules 2018-10-14 17:32:01 -07:00
Wojciech Milkowski 3598165c4d Fix build with Android NDK r18
As a bonus there is no need to use undocumented Gradle API any more.
2018-10-08 22:35:18 +02:00
Aaron Franke 37386f112b Remove redundant "== true" code
If it can be compared to a boolean, it can be evaluated as one in-place.
2018-10-06 16:12:36 -04:00
Rémi Verschelde d952126caf Fix warnings in Android platform
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]
```
2018-10-03 15:17:00 +02:00
Juan Linietsky bad991ea83 Many more fixes for GLES2 mobile export. Also added ability to turn on OpenGL debugging on Android export. 2018-10-02 10:00:15 -03:00
Juan Linietsky c24277a520 -Many GLES2 optimizations
-Android export fixes (use ETC if GLES2 backend in use)
-revert to thekla atlas because xatlas is not working well
2018-09-30 23:11:24 -03:00
Rémi Verschelde 3a2ca68af3 SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs,
Export should only be used when exporting *new* objects.
2018-09-28 14:07:39 +02:00
Rémi Verschelde e8282f9cce
Merge pull request #22465 from FeralBytes/patch-1
Add support for onRequestPermissionsResult()
2018-09-28 09:07:55 +02:00
FeralBytes 39738d1866 Add support for onRequestPermissionsResult()
Credit goes to @vanyasem  https://github.com/vanyasem/Godot-AndroidPermissions
But this is a much needed feature to support Android beyond API 21.
Fixed style errors again.
2018-09-27 19:20:26 -08:00
Rémi Verschelde cdc411fd54 Fix various warnings: [-Waddress], [-Wpointer-arith], [-Wwrite-strings], [-Wreturn-local-addr] and more
Fixes the following GCC 5 warnings:
```
core/os/file_access.cpp:49:19: warning: the address of 'FileAccess::create_func' will always evaluate as 'true' [-Waddress]
servers/audio_server.cpp:192:70: warning: comparison with string literal results in unspecified behaviour [-Waddress]

drivers/gles2/rasterizer_storage_gles2.cpp:4095:90: warning: NULL used in arithmetic [-Wpointer-arith]

modules/gdnative/register_types.cpp:237:3: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
platform/android/export/export.cpp:207:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

modules/gdscript/gdscript.h:150:67: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:119:56: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:123:56: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:127:50: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:131:52: warning: returning reference to temporary [-Wreturn-local-addr]

editor/plugins/skeleton_editor_plugin.cpp:34:36: warning: extra tokens at end of #include directive
modules/bullet/bullet_types_converter.cpp:31:9: warning: #pragma once in main file

editor/import/editor_scene_importer_gltf.cpp:1996:51: warning: name lookup of 'i' changed
modules/visual_script/visual_script_property_selector.cpp:402:45: warning: name lookup of 'E' changed
scene/gui/tree.cpp:1268:25: warning: name lookup of 'i' changed
scene/resources/visual_shader.cpp:808:32: warning: name lookup of 'i' changed
```
2018-09-27 16:33:52 +02:00
Rémi Verschelde d95bbb8922 Fix warnings about set but unused variables [-Wunused-but-set-variable]
Fixes the following GCC 5 warnings:
```
drivers/gles2/rasterizer_canvas_gles2.cpp:814:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2270:11: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2673:22: warning: variable 'e' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:715:7: warning: variable 'no_cull' set but not used [-Wunused-but-set-variable]
drivers/gles2/shader_gles2.cpp:693:14: warning: variable 'cc' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_canvas_gles3.cpp:1226:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:3039:10: warning: variable 'contrib' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:4504:32: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
editor/editor_inspector.cpp:272:9: warning: variable 'guide_color' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:1067:14: warning: variable 'alpha3' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:263:8: warning: variable 'script_bg_color' set but not used [-Wunused-but-set-variable]
editor/plugins/collision_shape_2d_editor_plugin.cpp:326:11: warning: variable 'cpoint' set but not used [-Wunused-but-set-variable]
editor/plugins/mesh_editor_plugin.cpp:72:9: warning: variable 'size' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:471:12: warning: variable 'mpos' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:89:8: warning: variable 'basetype_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:90:8: warning: variable 'type_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:92:8: warning: variable 'string_color' set but not used [-Wunused-but-set-variable]
modules/visual_script/visual_script_editor.cpp:2521:7: warning: variable 'seq_connect' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:580:12: warning: variable 'styles_count' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:584:12: warning: variable 'styles_offset' set but not used [-Wunused-but-set-variable]
platform/osx/export/export.cpp:464:9: warning: variable 'zerr' set but not used [-Wunused-but-set-variable]
scene/2d/tile_map.cpp:260:10: warning: variable 'tcenter' set but not used [-Wunused-but-set-variable]
scene/3d/light.cpp:166:7: warning: variable 'editor_ok' set but not used [-Wunused-but-set-variable]
scene/3d/navigation.cpp:566:11: warning: variable 'closest_navmesh' set but not used [-Wunused-but-set-variable]
scene/gui/rich_text_label.cpp:869:8: warning: variable 'size' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:705:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:706:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:726:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:727:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/resources/material.cpp:430:7: warning: variable 'using_world' set but not used [-Wunused-but-set-variable]
servers/visual/shader_language.cpp:2026:7: warning: variable 'all_const' set but not used [-Wunused-but-set-variable]
servers/visual/visual_server_scene.cpp:1383:28: warning: variable 'z_max_cam' set but not used [-Wunused-but-set-variable]
```

Also fixes two [-Wunused-value] warnings:
```
scene/gui/text_edit.cpp:4405:20: warning: statement has no effect [-Wunused-value]
servers/visual/visual_server_scene.cpp:905:48: warning: value computed is not used [-Wunused-value]
```

Some of those are bugs and need further work, they are identified with
`// FIXME` comments.
2018-09-27 16:25:24 +02:00
Rémi Verschelde cda5b0bfe1 Fix warnings about unused variables [-Wunused-variable]
Fixes the following GCC 5 warnings:
```
drivers/gles2/rasterizer_scene_gles2.cpp:1139:15: warning: unused variable 'offset' [-Wunused-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:1205:39: warning: unused variable 'multi_mesh' [-Wunused-variable]
drivers/gles2/rasterizer_storage_gles2.cpp:359:7: warning: unused variable 'srgb' [-Wunused-variable]
drivers/gles2/shader_gles2.cpp:1016:45: warning: unused variable 'texture_hints' [-Wunused-variable]
editor/animation_track_editor.cpp:776:9: warning: unused variable 'keys_to' [-Wunused-variable]
editor/editor_inspector.cpp:273:7: warning: unused variable 'vs_height' [-Wunused-variable]
editor/editor_themes.cpp:202:10: warning: unused variable 'begin_time' [-Wunused-variable]
editor/editor_themes.cpp:239:10: warning: unused variable 'end_time' [-Wunused-variable]
editor/plugins/animation_blend_tree_editor_plugin.cpp:726:17: warning: unused variable 'an' [-Wunused-variable]
editor/plugins/script_text_editor.cpp:1278:8: warning: unused variable 'fold_state' [-Wunused-variable]
main/main.cpp:132:13: warning: 'use_vsync' defined but not used [-Wunused-variable]
modules/cvtt/image_compress_cvtt.cpp:231:8: warning: unused variable 'y_end' [-Wunused-variable]
modules/cvtt/image_compress_cvtt.cpp:311:6: warning: unused variable 'shift' [-Wunused-variable]
modules/gdscript/gdscript_editor.cpp:58:7: warning: unused variable 'th' [-Wunused-variable]
modules/gridmap/grid_map.cpp:1084:6: warning: unused variable 'ofs' [-Wunused-variable]
modules/theora/video_stream_theora.cpp:442:9: warning: unused variable 'tr' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2606:6: warning: unused variable 'count' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2829:6: warning: unused variable 'seq_count' [-Wunused-variable]
modules/visual_script/visual_script_editor.cpp:2844:24: warning: unused variable 'vnode_function' [-Wunused-variable]
modules/websocket/lws_peer.cpp:122:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:135:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:63:12: warning: unused variable 'peer_data' [-Wunused-variable]
modules/websocket/lws_peer.cpp:91:12: warning: unused variable 'peer_data' [-Wunused-variable]
platform/android/export/export.cpp:763:16: warning: unused variable 'node_size' [-Wunused-variable]
scene/gui/rich_text_label.cpp:850:10: warning: unused variable 'x_ofs' [-Wunused-variable]
scene/gui/text_edit.cpp:653:8: warning: unused variable 'tab_w' [-Wunused-variable]
scene/resources/bit_mask.cpp:186:6: warning: unused variable 'i' [-Wunused-variable]
scene/resources/mesh.cpp:549:20: warning: '_array_name' defined but not used [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:107:10: warning: unused variable 'v2' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:108:10: warning: unused variable 'v3' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:109:10: warning: unused variable 'v4' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:110:10: warning: unused variable 'v5' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:111:10: warning: unused variable 'v0n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:112:10: warning: unused variable 'v1n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:113:10: warning: unused variable 'v2n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:114:10: warning: unused variable 'v3n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:115:10: warning: unused variable 'v4n' [-Wunused-variable]
servers/audio/audio_rb_resampler.cpp:116:10: warning: unused variable 'v5n' [-Wunused-variable]
servers/visual/default_mouse_cursor.xpm:2:21: warning: 'default_mouse_cursor_xpm' defined but not used [-Wunused-variable]
```
2018-09-27 16:25:24 +02:00
Rémi Verschelde e5bbcb8bcf Fix warnings for comparison between signed and unsigned integers [-Wsign-compare]
Also turn off -Wsign-compare warnings in the future, we do not consider them important.

Fixes the following GCC 5 warnings:
```
core/node_path.cpp:279:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/oa_hash_map.h:169:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/oa_hash_map.h:314:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles2/shader_gles2.cpp:985:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles3/rasterizer_storage_gles3.cpp:1075:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/pulseaudio/audio_driver_pulseaudio.cpp:343:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/editor_plugin.cpp:525:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/editor_properties_array_dict.cpp:747:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/spatial_editor_plugin.cpp:2078:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/spatial_editor_plugin.cpp:4096:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/sprite_editor_plugin.cpp💯20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:122:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:134:77: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:339:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/etc/image_etc.cpp:222:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/gdnative/register_types.cpp:242:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/gdnative/register_types.cpp:258:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:200:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:222:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:246:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1085:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1489:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1623:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:206:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:356:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:406:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:493:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/audio_stream_player_3d.cpp:420:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/audio_stream_sample.cpp:565:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/audio_stream_sample.cpp:571:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_rb_resampler.cpp:156:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
```

The following warnings were not fixed, as they implied casting for no gain:
```
core/io/packet_peer.cpp:228:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/io/resource_format_binary.cpp:109:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles2/rasterizer_scene_gles2.cpp:144:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/unix/file_access_unix.cpp:249:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:889:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:1020:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:1154:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:2255:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/bit_mask.cpp:336:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:141:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:150:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:154:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio_server.cpp:86:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio_server.cpp:89:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
```
2018-09-27 16:25:23 +02:00
volzhs 3a2d707697 Ignore invalid device for Android 2018-09-23 01:41:24 +09:00
Rémi Verschelde 1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz 08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
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.
2018-09-12 09:52:22 +02:00
Rémi Verschelde 76b211540e
Merge pull request #21865 from Calinou/tweak-android-export-errors
Tweak Android-related error messages in the Export dialog
2018-09-10 18:47:53 +02:00
Hugo Locurcio 8c8164129c
Tweak Android-related error messages in the Export dialog
OpenJDK 8 has been working well for exporting to Android
for a while now, so it can be recommended instead of OpenJDK 6.
2018-09-08 13:59:28 +02:00
Xavier Sellier f68e127079 Add clipboard operation for android OS 2018-09-05 17:27:45 -04:00
Wojciech Milkowski 3a3ea6d514 No need to link with libandroid_support in NDK 17
According to https://github.com/bytedeco/javacpp/pull/244 in NDK 17
libandroid_support library is not needed any more, and on armv8 is
already gone which breaks compilation.
2018-08-28 02:34:59 +02:00
Rémi Verschelde c1f687c681
Merge pull request #21387 from hpvb/fix-15324
Fall back to GLES2 if GLES3 is not working
2018-08-27 16:54:22 +02:00
Hein-Pieter van Braam 08f452d1a9 Fall back to GLES2 if GLES3 is not working
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
2018-08-26 16:40:46 +02:00
Crazy-P e4af39cbc0 Fixes several resource leaks in ...
- gdscript
- gdscript_compiler
- regex
- android/export
- gles3/rasterizer (scene and storage)
2018-08-26 09:19:02 +08:00
Rémi Verschelde 52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
Rémi Verschelde de59fe04e7 Add print_verbose to print to stdout only in verbose mode
Equivalent of the cumbersome:
if (OS::get_singleton()->is_stdout_verbose())
	print_line(msg);
2018-08-24 09:23:20 +02:00
Marcin Zawiejski 3c4c8c40db Fix file hints
Fixes file hints so the file dialog actually displays the files with given extension (e.g. *.apk).
2018-08-23 22:18:59 +02:00
Rémi Verschelde d3714d1787
Merge pull request #20507 from rdhafidh/android_libcpp_shared_master
add support libc++_shared on android (master)
2018-08-23 08:44:41 +02:00
Ridwan Abdul Hafidh b0419db46f add support libc++_shared stl on android 2018-08-23 05:02:47 +07:00
elasota 35f6ba5c5d BPTC support 2018-08-21 22:56:04 -04:00
Alessandro 9c1fd91732 fix Android/HTML5 custom templates option does not work 2018-08-20 17:38:23 +02:00
Rémi Verschelde 661c9ece7c Add PROPERTY_HINT_PLACEHOLDER_TEXT for String properties
Use it to provide a better example for application identifiers
on Android, iOS and macOS, where users thought they *had* to use
this as a magic token.
2018-08-20 13:48:05 +02:00
Tiago Quendera aa594614db
Update detect.py
Fixed a typo in detect.py
2018-08-17 12:08:17 +01:00
Juan Linietsky ea3d997f9d
Revert "added get_creation_time function for gdscript" 2018-08-10 13:29:49 -03:00
Juan Linietsky 275e0d5ee4
Merge pull request #18914 from notwarp/master
added get_creation_time function for gdscript
2018-08-10 13:28:47 -03:00
Hein-Pieter van Braam 0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
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.
2018-07-26 00:54:16 +02:00
Wilson E. Alvarez a22e746bc3 Removed unnecessary assignments 2018-07-24 09:51:03 +02:00
Juan Linietsky 2b9902db06 -Fix disable_3d flag
-Add extra flag optimize=[size,speed] to be able to prioritize size
2018-07-21 17:26:49 -03:00
Rémi Verschelde 8c9e10553c Fix build issues and typos after c69de2ba4 2018-07-20 08:37:10 +02:00
Juan Linietsky c69de2ba46 -Project/Editor settings now use new inspector
-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
2018-07-19 19:02:04 -03:00
Rémi Verschelde 7c9f7452f4 Style: Format code with clang-format 6.0.1 2018-07-18 16:27:03 +02:00
Rémi Verschelde 26d3e31e05
Merge pull request #20132 from ibrahn/fix-android-device-poll-thread
fixed branch on uninit and data race in editor android device polling
2018-07-17 14:48:49 +02:00
volzhs d18235bc38 Fix keep screen on property path for Android/iOS/UWP 2018-07-17 18:45:57 +09:00
Ibrahn Sahir fe4265ad46 fixed branch on uninit and data race in editor android device polling
Initialised relevant variables before stating thread,
to prevent a branch on uninitialised data.
Fixed race condition in polling that could miss a device change.
2018-07-13 13:30:50 +01:00
Hein-Pieter van Braam e2b7a68db4
Merge pull request #20041 from hpvb/fix-android-export
Write new permissions to the AndroidManifest.xml
2018-07-08 15:47:12 +02:00
Hein-Pieter van Braam 2a126242dd Write new permissions to the AndroidManifest.xml
Instead of editing the placeholder permissions actually write new ones.
This should solve the privacy statement problems for the Play store.
This means we also no longer need to placeholder permissions in the
template.
2018-07-08 14:58:15 +02:00
Patrick Kaster 8bb90fd5f3 added 'android_add_asset_dir('...') method to Android module gradle build config
(cherry picked from commit 9190ae2be7)
2018-07-05 01:58:33 +02:00
Max Hilbrunner 28ebddd49e
Merge pull request #19799 from kosz78/android-payment-fix
Fix possible NullPointerException crash on cancel payment
2018-07-03 18:52:10 +02:00
volzhs 1262f940c1 Change required gles version to 2 for android 2018-07-04 00:29:23 +09:00
Hugo Locurcio 53e94a1ce1
Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
Konstantin Zaitsev d05db4de8e Fix possible NullPointerException crash on cancel payment 2018-06-27 14:12:53 +07:00
geequlim e2aa777d4d Implement OpenGL ES rasterizer selection logic for Android. 2018-06-26 12:21:06 +08:00
Juan Linietsky efdd0c4b89 Oops, for some reason gedit used this file as my notebook, though I made a new one. 2018-06-07 12:52:00 -03:00
Juan Linietsky b659fd6d74 Entirely new (and much improved) animation editor. 2018-06-07 12:52:00 -03:00
Dmitry Pupinin 46bab3abc7 Allow setting higher numbers in Android version/code 2018-05-29 11:59:23 +02:00
Daniele Giuliani d315b0fb8a added get_creation_time function for gdscript 2018-05-16 00:50:57 +02:00
Rémi Verschelde 720e2f7b09
Merge pull request #18726 from volzhs/remove-legacy
Remove android compatibility under API 16
2018-05-08 23:49:37 +02:00
volzhs 2f8f34ceaf Remove android compatibility under API 16 2018-05-09 06:01:33 +09:00
Rémi Verschelde a6552819b1 Android: Increase targetSdkVersion to 27
Matches the change for 2.1 in #18626, and the new requirements from Google
for new apps starting with August 2018 (targetSdkVersion 26 or higher):
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
2018-05-08 15:29:42 +02:00
RameshRavone d3182248c4
Fix: JAR files signed with the MD5 algorithm as unsigned 2018-05-07 21:02:53 +05:30
Rémi Verschelde 18c28c159d
Merge pull request #17196 from RandomShaper/improve-gui-touch
Implement universal translation of touch to mouse (3.1)
2018-05-02 10:47:49 +02:00
Pedro J. Estébanez de9d40a953 Implement universal translation of touch to mouse
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`
2018-04-30 19:03:38 +02:00
Ignacio Etcheverry c8884ce3bd Fix _export_begin not being called when exporting to android 2018-04-26 23:07:21 +02:00
Hugo Locurcio 1c419531a0 Change ".." punctuation for "..." in editor strings (#16507) 2018-04-22 19:36:01 +02:00
Ruslan Mustakov 265caa687b Provide error details when in-app purchase fails 2018-04-19 21:04:20 +07:00
Ruslan Mustakov 5dffa506dc Fix Android input source checks
Input source types are not pure bit flags, they are combinations of
flags, so != 0 check was incorrect and resulted in crashes later, when
trying to obtain the device.
2018-04-16 11:19:07 +07:00
Ruslan Mustakov 995724b762 Add safety checks when handling Android input
It is possible that input comes before the engine is fully initialized.
This fixes the crashes that ocurred when that happens.
2018-03-27 22:03:44 +07:00
Xavier Sellier 61e8f8a866 Prevent android to split-screen 2018-03-21 08:53:51 -04:00
volzhs 4e378aeeb8 Fix getting Android device information
Fix #17644
2018-03-20 13:53:33 +09:00
Viktor Ferenczi 272ecddb28 Properly closing all files in Python code 2018-03-11 14:55:50 +01:00
Marcelo Fernandez d780d774aa Clean and expose get_audio/video_driver_* funcs on OS class 2018-03-04 14:18:05 -03:00
Ruslan Mustakov c10749d51f Fix intermittent audio driver crash during startup on Android
set_pause can be called before the driver is initialized, and there
already is a check for that. The problem is that the 'active' field
was not initialied in the constructor, which lead to it having an
undefined value.
2018-03-01 17:40:44 +07:00
Rémi Verschelde 7d09e6540a Android: Mark GLES3 as required in the manifest
Fixes #17076.
2018-02-27 13:33:24 +01:00
luz.paz 612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Hugo Locurcio d698814367
Remove some debugging prints on Android 2018-02-18 00:09:56 +01:00
Rémi Verschelde 717e388e19
Merge pull request #14804 from ColinKinloch/master
Fixed android arm64v8
2018-02-14 11:55:28 +01:00
Xavier Sellier b8def58705 Add signals and a check function for Android service connectivity.
- Add a iap_connect and iap_disconnect events for android platform.
- Add isConnected() function returning true if its connected to android service, false otherwise

(cherry picked from commit 546b48813f)
2018-02-14 08:05:19 +01:00
Rémi Verschelde e3658a6464 Fix broken APK expansion due to missed option renames
Command line options were refactored for 3.0 to follow the common usage
of double-dashed long options, but `--main-pack` went through the cracks.

Fixes #16533.
2018-02-13 22:41:19 +01:00
Ruslan Mustakov 8d41175cae Fix Android onTextChanged crash
As it turns out, onTextChanged supplies a mutable CharSequence, which
lead to crashes or unexpected behaviour when input was coming faster
than it was processed.
2018-01-17 19:28:27 +07:00
Rémi Verschelde fb0cd802c4
Merge pull request #15773 from endragor/android-gdnative-remote-fs
Make remote FS work with GDNative on Android
2018-01-16 22:26:27 +01:00
Ruslan Mustakov 99f93ea440 Make remote FS work with GDNative on Android
.so files are added to the .apk when remote FS is used.
2018-01-16 15:18:47 +07:00
Ruslan Mustakov 1d763a2cb8 Fix open_dynamic_library for Android 2018-01-13 20:40:20 +07:00
volzhs dfdc8c2d9a Fix Android build error
Fix #15603
Fix #15513
2018-01-12 04:24:11 +09:00
Rémi Verschelde 06bb4acae0
Merge pull request #15440 from volzhs/fix-android-touch
Fix Android multi touch
2018-01-08 08:04:33 +01:00
volzhs 8fbb82719e Fix Android multi touch
Fix #11798
2018-01-07 23:29:44 +09:00
volzhs d2dc70d7d5 Fix Android build error 2018-01-06 22:32:39 +09:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
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.
2018-01-05 01:22:23 +01:00
Emmanuel Leblond e315c94900 Change OS::initialize signature to return Error (fix segfault on x11) 2018-01-04 15:15:55 +01:00
Rémi Verschelde b7b0ffd5c4
Merge pull request #15279 from volzhs/android-update-build
Update android build tool to latest
2018-01-03 18:06:08 +01:00
volzhs 4bea7d1b5f Update android build tool to latest 2018-01-03 17:25:07 +09:00
Rémi Verschelde 6322b0bbb7
Merge pull request #12814 from guilhermefelipecgs/add_hardware_custom_cursor
Custom hardware-accelerated mouse cursor
2018-01-03 08:35:59 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Colin Kinloch 853b1daa49 Fixed android arm64v8 2017-12-23 16:49:04 +00:00
Rémi Verschelde aefa23eac1
Merge pull request #14794 from endragor/remove-debug-logs
Remove debug logs that are of no use to end users
2017-12-18 07:40:01 +01:00
Ruslan Mustakov ec31c4f380 Remove debug logs that are of no use to end users 2017-12-18 13:37:37 +07:00
Guilherme Silva a392dbdbe3 Add implementation for custom hardware cursor 2017-12-17 13:40:29 -02:00
Rémi Verschelde 8f25a2dc11 Cleanup some #if 0'd code 2017-12-17 15:40:24 +01:00
Rémi Verschelde fc0e341fc5
Merge pull request #14764 from poke1024/android
Increase sleep time for android export thread
2017-12-17 14:18:47 +01:00
Colin Kinloch 064189c693 Fixed Android NDK unified header detection for python 3 2017-12-17 12:01:16 +00:00
Bernhard Liebl 95edc3855a Increase sleep time for android export thread 2017-12-17 11:50:11 +01:00
Nathan Warden f89d78a7a4 Updated Linux template extensions to match architecture. 2017-12-12 16:09:48 -05:00
Rémi Verschelde d98e280137
Merge pull request #14485 from RandomShaper/fix-android-export
Fix crash on Android export
2017-12-10 11:22:45 +01:00
Pedro J. Estébanez 9e9db55cb8 Fix crash on Android export
Caused by a zero-length command-line segment.

Fixes #14343.
2017-12-10 02:31:51 +01:00
Rémi Verschelde 7cb6e6b723 Style: Apply clang-format to Java files
Only those from org/godotengine/godot though, not the thirdparty ones.
2017-12-10 01:16:07 +01:00
Rémi Verschelde 13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
Rémi Verschelde e7b7e7b7b0
Merge pull request #14318 from endragor/compile-sdk-version-26
Update Android compileSdkVersion to 26
2017-12-06 19:14:31 +01:00
Ruslan Mustakov b697444bc8 Update Android compileSdkVersion to 26 2017-12-06 22:35:15 +07:00
Unknown fd1b94e307 Improve slang, especially in user-visible parts 2017-12-05 15:41:38 +01:00
Rhody Lugo a65c0939fd disable caching for targets using helper functions 2017-11-28 23:24:12 -04:00
Rhody Lugo a4a222d62d use the same cache for all branches for appveyor 2017-11-28 03:23:33 -04:00
Rémi Verschelde d9faf6f2f4 Fix build on macOS and Android after bc2e8d99 2017-11-25 10:42:20 +01:00
Juan Linietsky bc2e8d99e5 Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,
leading to unnecesary copy on writes and reduced performance.
2017-11-25 00:09:40 -03:00
Ruslan Mustakov 871deb6878 Allow to specify multiple resolution Android icons 2017-11-24 11:19:22 +07:00
Rémi Verschelde bedcbdd420
Merge pull request #13130 from endragor/gdnative-android-export
Proper GDNative export on Android
2017-11-21 23:59:01 +01:00
Ruslan Mustakov ebf9b80a47 Proper GDNative export on Android 2017-11-21 20:40:31 +07:00
Ruslan Mustakov d42c5646a5 Return and repair file logging
And make it configurable, too.
2017-11-21 16:43:44 +07:00
Ruslan Mustakov 8f0f327f02 Allow configuring iOS export
- EditorExportPlugin's _export_begin accepts all the arguments related
   to the current export (is_debug, path, flags).

 - EditorExportPlugin API is extended with methods allowing to configure
   iOS export: add_ios_framework, add_ios_plist_content,
   add_ios_linker_flags, add_ios_bundle_file.

 - iOS export template now contains Godot as a static library so that
   it can be linked with third-party Frameworks and GDNative static
   libraries.

 - Adds method to DirAccess for recursive copying of a directory.

 - Fixes iOS export to work with Xcode 9 (released recently).
2017-11-21 01:16:49 +07:00
Rémi Verschelde 83e7287752
Merge pull request #13053 from akien-mga/methods-mkstr
Remove need to _MKSTR version strings and rename "revision" to "build"
2017-11-20 08:54:19 +01:00
Konstantin Zaitsev 79178e75cd Set android 'compileSdkVersion' to 24 2017-11-20 10:45:59 +07:00
Rémi Verschelde 6947bed015 Pass engine name and version parts as proper strings
Removes the need for _MKSTR all over the place which has the drawback of
converting _MKSTR(UNKNOWN_DEFINE) to "UKNOWN_DEFINE" instead of throwing
a compilation error.
2017-11-20 00:51:14 +01:00
Rémi Verschelde ecf80fbbba
Merge pull request #12988 from akien-mga/xdg-home-paths
Add support for XDG Base Directory spec
2017-11-20 00:42:51 +01:00
Rémi Verschelde 6e3f2f44af Use new XDG folders to dehardcode paths 2017-11-19 20:54:26 +01:00
Rémi Verschelde 9f134aa5d1 Cleanup old references to GLES2 renderer
There are still some left in the Android Java code, even stuff to swap between
GLES1 and GLES2 support from early Godot days... would be good to see some cleanup
there too one day.

The "graphics/api" option for Android exports is removed, as only GLES 3.0 is supported.
It can be readded when GLES 2.0 support comes back. Fixes #13004.
2017-11-19 17:52:18 +01:00
Rémi Verschelde ad199c3964 EditorSettings: Rename settings_path to settings_dir
Also to prepare for upcoming refactoring for XDG support.
2017-11-17 20:55:09 +01:00
Rémi Verschelde 73049d115e Rename OS::get_data_dir to OS::get_user_data_dir
Will be needed to avoid confusion with system data path (XDG_DATA_HOME)
and editor data dir in upcoming refactoring.
2017-11-17 20:55:09 +01:00
Rémi Verschelde 61a693cf78
Merge pull request #12922 from eska014/engine-singletons
Singleton management changes
2017-11-14 20:44:55 +01:00
Leon Krause 9b7b46143d Move singleton management from ProjectSettings to Engine 2017-11-14 15:15:13 +01:00
Rémi Verschelde ba7e00dfef
Merge pull request #12885 from rraallvv/osx_android_travis
travis: caching Android, iOS, macOS (cross-compile) (master)
2017-11-13 21:44:23 +01:00
Rhody Lugo 7f3ecd4227 change matrix and enable caching for Android, iOS and macOS (cross-compile) 2017-11-13 15:05:26 -04:00
Bastiaan Olij 6205eb40e7 Align sensors and implement gravity sensor for Android 2017-11-11 09:42:23 +11:00
Rémi Verschelde 2507818f05
Merge pull request #12782 from rraallvv/unified_headers_fix
add missing distutils.version.LooseVersion import
2017-11-09 17:17:35 +01:00
Juan Linietsky d09160a8b6 Make video mode initialization more intuitive, fixes #12022 2017-11-09 13:02:26 -03:00
Rhody Lugo 7957bbf558 add missing distutils.version.LooseVersion import 2017-11-09 11:58:29 -04:00
Rhody Lugo 7664a0feac unified headers fix 2017-11-09 09:46:43 -04:00
AndreaCatania e44408f653 Compile Android with STL enabled by default 2017-11-08 12:51:35 +01:00
Rémi Verschelde 9437db7bc5
Merge pull request #12604 from rraallvv/unified_headers
add support for Android NDK unified headers (master)
2017-11-06 16:07:00 +01:00
Rhody Lugo ec31b23b33 add support for Android NDK unified headers 2017-11-06 07:51:09 -04:00
Rémi Verschelde 5bc2cf257b Convert DOS line endings to Unix line endings
Should fix issues some of us have with `misc/dist/uwp_template/AppxManifest.xml`
always showing up as modified.
Might cause issues on Windows due to the removal of BOMs or change of line endings
in some of the Mono, UWP or gradlew.bat files, we will test and adapt if need be.
2017-11-05 11:37:59 +01:00
Juan Linietsky 7715a261d5
Merge pull request #12262 from AndreaCatania/pplug
Physics server plug
2017-11-03 23:39:44 -03:00
AndreaCatania 7a9ca08f16 Implemented physics plug
Moved init_physics

Implemented physics 2D plug

Fix clang

Fix clang

Fix static check

Fix clang

Fix static check

Moved physics server initialization

Moved physics server settings initialization
2017-11-04 03:25:51 +01:00
Rémi Verschelde 87694d1884 Disable logging until the logs location is sorted out
Temporary workaround for #12277.
2017-10-29 15:50:27 +01:00
Rémi Verschelde 6361e24f29 Cleanup unnecessary debug prints 2017-10-21 20:41:07 +02:00
Ramesh Ravone 55784b0c38
export onBackPress for Android Module 2017-10-15 10:35:13 +05:30
Andreas Haas 547cc8b7ab Merge pull request #11775 from endragor/android-keyboard-input
Improve input handling on Android
2017-10-10 20:22:06 +02:00
Rémi Verschelde cb7e4aa6d4 Merge pull request #11926 from RameshRavone/patch-11
flatDir support [Android] (Master)

[ci skip]
2017-10-09 15:05:47 +02:00
Rémi Verschelde 321ae21d5f Merge pull request #11878 from endragor/gradle-repository-urls
Use additional repositories for gradle build dependencies too

[ci skip]
2017-10-09 12:40:31 +02:00
Ramesh Ravone a4cee286e6
flatDir support [Android] 2017-10-07 15:10:17 +05:30
Ruslan Mustakov a6625221d2 Use additional repositories for gradle build dependencies too 2017-10-06 16:08:57 +07:00
Juan Linietsky 3d87b70f7a Added the set/get_setting function in Editor/Project settings. Renamed has() to has_setting. Fixes #11844 2017-10-05 15:34:34 -03:00
Ruslan Mustakov 275e537058 Allow to obtain virtual keyboard height
On mobile platforms virtual keyboards take up significant amount of
screen space and UI containing a text box may need to be adjusted
after the keyboard appears to keep the text box visible to user. This
commit adds a way to obtain virtual keyabord height so that controls
are aware of how much they need to move.
2017-10-04 17:21:05 +07:00
Ruslan Mustakov ca7447daf6 Improve input handling on Android
- Dispatch input immediately as it comes, instead of delaying it to the
   next step().

 - Fix text box input handling when caret is at the middle of the text.

 - Minimize queueEvent calls on Java side.
2017-10-04 16:14:29 +07:00
Andreas Haas 132ba0ed97 Merge pull request #11568 from endragor/loggers
Extract logging logic
2017-10-02 23:51:26 +02:00
Elliott Sales de Andrade 3e69d19116 Use BoolVariable in platform-specific options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade 5be675eb03 Use BoolVariable for module options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade ffab67b8da Use BoolVariable in target/component/advanced options. 2017-09-25 14:36:02 -04:00
Elliott Sales de Andrade f9e463bce2 Use EnumVariable for choice-based build options. 2017-09-25 14:36:01 -04:00
Ruslan Mustakov 1a2311e350 Extract logging logic
Previously logging logic was scattered over OS class implementations
with plenty of duplication. Major changes in this commit:

 - Extracted logging logic into a separate Logger hierarchy. It allows
   easy configuration of logging mechanism depending on compile-time or
   run-time configuration.

 - Implemented RotatedFileLogger which is usually used with StdLogger,
   providing persistency of logs. It is often important to be able to
   obtain logs of the game even in production to be able to understand
   what happened prior to some problem. On mobile there previously was
   no way to obtain the logs aside from having the device connected to
   your machine.

 - flush() is not performed in release mode for every logged line. It
   is only performed for errors.
2017-09-25 16:19:21 +07:00
volzhs 1a704d7676 Fix TrustManager for Android 2017-09-21 20:56:38 +09:00
letheed 5ad9be4c24 Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:

* pos -> position
* rot -> rotation
* loc -> location

C++ variables are left as is.
2017-09-20 13:11:10 +02:00
Ruslan Mustakov ea7223d181 Set Android minSdkVersion to 18
It's the minimum version where GLES 3 API is available. It is already
the version Godot binary is compiled with for Android, but the config
files were not updated in time.
2017-09-20 11:49:46 +07:00
Rémi Verschelde 53bbc046ee Merge pull request #11252 from marcelofg55/fix_noaudio_crash
Fix crash when no audio driver is available
2017-09-17 22:48:22 +02:00
Marcelo Fernandez 7a4c0ff35e Fix crash when no audio driver is available 2017-09-13 20:54:55 -03:00
Maxim Sheronov 0fffa45158 Fix enums bindings
Add missed bindings for enums
Move some enums to class to have correct output of api.json
2017-09-13 20:57:07 +03:00
Hein-Pieter van Braam b2a38854fd Fix unused variable warnings
The forth in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-08 15:03:53 +02:00
Hein-Pieter van Braam 9c63ab99f0 Fix use of unitialized variables
The second in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-02 01:59:26 +02:00
Poommetee Ketson ed606ded52 Fix files header 2017-09-01 21:07:55 +07:00
Rémi Verschelde 6f762ad709 Merge pull request #10422 from endragor/gdnative-android
Make GDNative work on Android
2017-08-31 13:51:10 +02:00