Commit graph

2597 commits

Author SHA1 Message Date
bruvzg
bd5413e05f
WinTab: Make movement smoother and handle pressure/tilt changes when cursor is not moving [3.2]. 2020-05-11 12:32:15 +03:00
Technohacker
0456311be3
Don't force borderless mode when using per-pixel transparency 2020-05-10 21:05:37 +05:30
Technohacker
9584f24be5
Use DWMEnableBlurBehindWindow instead of WS_EX_LAYERED
Affects per-pixel transparency

The current method renders to the screen by copying the GLES output to a
DIB for transparency using the CPU instead of rendering directly to the
window via the GPU. This is slower and also forces the window to be borderless
as WS_EX_LAYERED affects the non-client region as well.

This change uses DWMEnableBlurBehindWindow which allows using the standard
glClearColor() background alpha and is also performed through the GPU,
eliminating CPU bottlenecks
2020-05-10 21:05:37 +05:30
Rémi Verschelde
e637fe9dd3 clang-format: Add JavaImportGroups for Java code
(cherry picked from commit 6038325470)
2020-05-07 13:36:27 +02:00
Fredia Huya-Kouadio
918f5dee23 Address OS.request_permissions() bug when non-platform permission(s) is included
(cherry picked from commit ef62506e5c)
2020-05-06 23:29:29 +02:00
bruvzg
78266c09c4
Add support for the WinTab API for pen input. (3.2) 2020-05-05 14:56:02 +03:00
bruvzg
da2ca9e22a [Linux/Windows] Set pressure to 1.0f when primary button is pressed and device is not pressure sensitive.
(cherry picked from commit 0128947894)
2020-05-05 13:41:29 +02:00
Marcel Admiraal
a286edb821 Fix X11 pressure and tilt values.
(cherry picked from commit a2ad0878ed)
2020-05-05 13:41:29 +02:00
Christoph Schröder
d70cb49eef Move mouse wheel handler from window to canvas element in HTML
Similar to https://github.com/godotengine/godot/pull/36557

At least in chrome, the following error is printed for each mouse wheel
rotation:
[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/6662647093133312

This PR moves the handler to the canvas and thereby fixes the error.

Tested on: Chrome and Firefox (MacOS), Firefox, Chrome(Android), Safari (IPad + MacOS)

(cherry picked from commit b1e8ac7b08)
2020-05-04 16:10:22 +02:00
Marcel Admiraal
48bc3fd297 Fix Android export throwing Unicode errors.
(cherry picked from commit e74f8aaaf1)
2020-05-01 10:56:58 +02:00
Hugo Locurcio
9b6df1ed00 Set the title tag in the HTML5 export immediately
This makes the project title display without having to wait for
the project to finish loading.

(cherry picked from commit eecce139ea)
2020-04-27 10:19:33 +02:00
Rémi Verschelde
aecba58e92 Windows: Appease capricious MSVC versions with moody headers
Fixes #37799.
Fixes #37986.

(cherry picked from commit 4d3a18d9ff)
2020-04-27 10:19:08 +02:00
Fredia Huya-Kouadio
2d9725b89d Fix detection logic for the Android sdk path
The previous logic used the 'tools' directory within the Android sdk to validate it. That directory was recently deprecated and removed from the Android sdk folder (https://developer.android.com/studio/releases/sdk-tools)

(cherry picked from commit 328354f878)
2020-04-27 10:15:56 +02:00
Fredia Huya-Kouadio
17ad99c206 Fix Android templates size regression
The issue was caused by PR #36906 which changes prevented the generated shared libraries from being stripped.
Since the change is only needed for development (debugging) purposes, it's commented out by default.

(cherry picked from commit 2f38cfd9ab)
2020-04-23 11:08:46 +02:00
Fredia Huya-Kouadio
b7fa9cf8ff Fix compilation issue by updating a call to runOnGLThread that was missed by PR #37175 2020-04-16 16:16:24 -07:00
Rémi Verschelde
c4a849588b
Merge pull request #37175 from m4gr3d/make_godot_plugin_callbacks_generic_3.2
[3.2] Update the naming scheme for the GodotPlugin's methods
2020-04-17 00:08:27 +02:00
Marcel Admiraal
b4ab045444 Fix loss of precision in X11 device info.
(cherry picked from commit 9369b37f1f)
2020-04-16 12:47:19 +02:00
SkyJJ
96e381ac03 Validate supported architectures when exporting to Android
(cherry picked from commit 7fcd13575e)
2020-04-16 11:41:41 +02:00
fhuya
373db27788 Migrate legacy apache dependency to the GodotPayment plugin
This is the only location in the codebase where it's being used, so no need to make the main lib have a dependency on it.

(cherry picked from commit c591cb8fda)
2020-04-16 11:41:23 +02:00
Rémi Verschelde
88e1264893 Android: Bump build tools to 29.0.3
(cherry picked from commit ca896ddbf0)
2020-04-16 11:41:11 +02:00
fhuya
ff7b455478 Delete unused drawable resources.
(cherry picked from commit 73d4e2eefb)
2020-04-16 11:40:56 +02:00
fhuya
fd045b8b91 Update Android custom template build configuration.
(cherry picked from commit 9c11076a20)
2020-04-16 11:40:06 +02:00
Ignacio Etcheverry
0e43565a7c Fix exporting corrupted Xcode pbxproj if project name has spaces 2020-04-14 18:03:10 +02:00
Ignacio Etcheverry
445f1c6e7b Mono/C#: Add iOS support
Right now, games only work on devices when exported with FullAOT+Interpreter.
There are some issues left that need to addressed for FullAOT alone. Right now,
it's giving issues with the Godot.NativeCalls static constructor.
2020-04-14 18:03:10 +02:00
Rémi Verschelde
5698a9ec74
Merge pull request #37305 from m4gr3d/implement_plugin_signals_3.2
[3.2] Add signal support to Godot Android plugin:
2020-04-10 18:42:32 +02:00
Rémi Verschelde
798bf901b8 Android: Downgrade gradle plugin to 3.5.3
With the NDK installed locally, gradle plugin 3.6.0 seems to enforce
a specific older NDK version, and will fail building if you don't have
it installed with:

```
No version of NDK matched the requested version 20.0.5594570.
Versions available locally: 21.0.6113669
```

Upstream issue: https://github.com/gradle/gradle/issues/12440

(cherry picked from commit ba2ec53a26)
2020-04-02 23:34:02 +02:00
fhuya
b995256bca Update the naming scheme for the GodotPlugin's methods in preparation of the vulkan integration. 2020-03-28 15:42:21 -07:00
fhuya
0c782ca2b2 Backport Kotlin support 2020-03-27 10:18:30 -07:00
fhuya
f69760b4be Add signal support to Godot Android plugin:
Supports registering and emitting signal from a Godot Android plugin
2020-03-27 01:37:41 -07:00
fhuya
7135bc3e37 Miscellaneous cleanup for the Android codebase:
- update gradle plugins versions
- cleanup java_godot_lib_jni

Note: logic was mostly moved around and no new logic/functionality was added.
2020-03-25 09:00:37 -07:00
Rémi Verschelde
acd14e645a Remove unused classes and stray headers
Found by reviewing headers with 1 or less matching includes:
```
find -name thirdparty -prune -o -name "*.h" -exec basename {} \; | sort -u > headers
for header in $(cat headers); do echo "$header: "; rg -l "#include \"(.*/)?$header\"" | wc -l; done > list-includes
```

(cherry picked from commit 9d24541597)
2020-03-25 11:38:54 +01:00
Rajat Goswami
19e71f94d8 Adding missing include guards to header files identified by LGTM.
This addresses the issue godotengine/godot#37143

(cherry picked from commit 2ecf928ae3)
2020-03-25 11:38:54 +01:00
unknown
fcde11222a Removed unused code in android detect.py and SCsub
(cherry picked from commit 90cdacd741)
2020-03-25 11:38:54 +01:00
m6c7l
dec7014ca8 issue-37239 add relaxation to conditions in the joystick check routine for being identified as joystick
(cherry picked from commit 36293f4256)
2020-03-25 11:38:54 +01:00
Pedro J. Estébanez
f57579ba6c Make stack size on Windows match Linux and MacOS
(cherry picked from commit 29f8530afe)
2020-03-25 11:38:53 +01:00
PouleyKetchoupp
2e4e1e0324 Fix text_entered signal when max_length is used in LineEdit on Android
Fixes #35954

(cherry picked from commit c169367e83)
2020-03-25 11:38:53 +01:00
fhuya
9a035efe62 Complete the implementation of the GodotPayment plugin.
Move the remaining plugin components within the plugin source code.

(cherry picked from commit 99173c5fc4)
2020-03-25 11:38:53 +01:00
fhuya
cd2b2bf8bf Enable Android studio debugger.
(cherry picked from commit 41dadb2b2b)
2020-03-25 11:38:53 +01:00
Rémi Verschelde
ec752f7c9b Linux: Add Mesa 20 "Intel" to prime detection
Diff in `glxinfo` between Mesa 19.3.4 and 20.0.1:
```diff
-OpenGL vendor string: Intel Open Source Technology Center
-OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2)
-OpenGL core profile version string: 4.6 (Core Profile) Mesa 19.3.4
+OpenGL vendor string: Intel
+OpenGL renderer string: Mesa Intel(R) HD Graphics 630 (KBL GT2)
+OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.1
```

(cherry picked from commit db28e7ef69)
2020-03-25 11:38:53 +01:00
Rémi Verschelde
4a38ec3937
Merge pull request #36336 from m4gr3d/android_plugin_v2_for_godot_3_2
Re-architecture of the Godot Android plugin. [3.2]
2020-03-17 16:27:59 +01:00
Rémi Verschelde
e5526544a3 Revert "Change LINKFLAGS to FRAMEWORKS which is supported since Scons release 0.96.91"
This reverts commit 2e152b945f.

SCons `FRAMEWORKS` is, according to their latest docs, only supported
"On Mac OS X with gcc". While the "with gcc" part seems bogus, #36795
did introduce a link failure for our osxcross toolchain for compiling
macOS binaries from Linux. SCons probably fails to detect this as a
macOS target and does not use its `FRAMEWORKS` logic properly.

So using `LINKFLAGS` as we used to is the more portable solution.
2020-03-10 09:56:37 +01:00
fhuya
c3660bb4dc Re-architecture of the Godot Android plugin. 2020-03-09 10:30:02 +01:00
Rémi Verschelde
98d0bf7d7a assimp: Clean and document buildsystem, prepare for unbundling
- Improve the SCsub to allow unbundling and remove unnecessary code.
- Move files around to match upstream source.
- Re-sync with upstream commit 308db73d0b3c2d1870cd3e465eaa283692a4cf23
  to ensure we don't have local modifications.
- Doesn't actually build against current version 5.0.1 due to the lack
  of the new ArmaturePopulate API that Gordon authored. We'll have to
  wait for a public release with that API (5.1?) to enable unbundling.

(cherry picked from commit 9d8a9ea826)
2020-03-06 23:53:23 +01:00
bruvzg
5bbce634ad Replace IOHIDDeviceRegisterRemovalCallback with IOHIDManagerRegisterDeviceRemovalCallback to fix gamepad disconnection callback on macOS Catalina.
(cherry picked from commit 6b23e36dbc)
2020-03-06 23:51:26 +01:00
hungrymonkey
2e152b945f Change LINKFLAGS to FRAMEWORKS which is supported since Scons release 0.96.91
Fixes the link errors below

clang: error: no such file or directory: 'Carbon'
clang: error: no such file or directory: 'AudioUnit'
clang: error: no such file or directory: 'CoreAudio'
clang: error: no such file or directory: 'CoreMIDI'
clang: error: no such file or directory: 'IOKit'
clang: error: no such file or directory: 'ForceFeedback'
clang: error: no such file or directory: 'CoreVideo'
clang: error: no such file or directory: 'AVFoundation'
clang: error: no such file or directory: 'CoreMedia'
clang: error: no such file or directory: 'Metal'
clang: error: no such file or directory: 'QuartzCore'

Tested on
System Version: macOS 10.15.3 (19D76)

SCons by Steven Knight et al.:
script: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog
engine: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog
engine path: ['/usr/local/Cellar/scons/3.1.2_1/libexec/scons-local/SCons']

Xcode 11.3.1
Build version 11C504

Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.3.0

Closes #36720

(cherry picked from commit c924e83a64)
2020-03-06 23:51:26 +01:00
Rémi Verschelde
75164169c4 SCons: Fix get_compiler_version() to return ints
Otherwise comparisons would fail for compiler versions above 10.
Also simplified code somewhat to avoid using subprocess too much
needlessly.

(cherry picked from commits c7dc5142b5
and df7ecfc4a7)
2020-03-04 14:40:12 +01:00
Rémi Verschelde
c34b351b24 SCons: Explicitly define our C (C11) and C++ (C++14) standards
On GCC and Clang, we use C11 and C++14 with GNU extensions (`std=gnu11`
and `std=gnu++14`). Those are the defaults for current GCC and Clang,
and also match the feature sets we want to use in Godot.

On MSVC, we require C++14 support explicitly with `/std:c++14`, and
make it strict with the use of `/permissive-` (so features of C++17 or
later can't be used).

Moves the definition before querying environment flags and platform
config so that it can be overridden when necessary.

(cherry picked from commit 342f127362)
2020-03-04 14:12:19 +01:00
Christoph Schroeder
031aed3bb7 Fixes touch events for HTML
Without this patch, the following exception is thrown when the touch
screen is used: TypeError: e.getBoundingClientRect is not a function.
No touch events arrive in the engine.

From my testing, this PR fixes the issue and behaves as expected.

Tested with godot-demo-projects/misc/multitouch_view/, emscripten 1.39.8
and Firefox mobile emulator as well as FF on Android

(cherry picked from commit 5134317afc)
2020-03-04 12:40:15 +01:00
Mateo Dev .59
d6c94fd527 os: execute parse the command output from utf8
(cherry picked from commit 8a88637705)
2020-03-04 12:40:15 +01:00
Rafał Mikrut
d001ca320d Fix suspicious | and + operators
(cherry picked from commit d0621b954b)
2020-03-04 12:40:14 +01:00